Skip to content
Snippets Groups Projects
Commit ecfe8320 authored by Marta Vila Fernandes's avatar Marta Vila Fernandes :game_die:
Browse files

use only sed

parent 3977fc5b
No related branches found
No related tags found
1 merge request!223[LOS1012] Stop unzip of the yaml and xml files
Pipeline #4800678 passed
......@@ -160,13 +160,13 @@ EOF
/bin/rm -f $REPOPATH/comps.xml
# Keep the current xml.gz file and remove the older one
UPDXMLFILE=$(/bin/grep updateinfo.xml.gz ${REPOPATH}/repodata/repomd.xml | sed 's/.*repodata\/\(.*\)".*/\1/')
UPDXMLFILE=$(sed '/updateinfo.xml.gz/!d; s/.*repodata\/\(.*\)".*/\1/' ${REPOPATH}/repodata/repomd.xml)
if [ -f "$UPDXMLFILE" ]; then
/usr/bin/find ${REPOPATH} -name '*updateinfo.xml*' -not -name $UPDXMLFILE -delete
fi
# Keep the current yaml.gz file and remove the older one
MODULEFILE=$(/bin/grep module ${REPOPATH}/repodata/repomd.xml | grep yaml.gz | sed 's/.*repodata\/\(.*\)".*/\1/')
MODULEFILE=$(sed '/yaml.gz/!d; s/.*repodata\/\(.*\)".*/\1/' ${REPOPATH}/repodata/repomd.xml)
if [ -f "$MODULEFILE" ]; then
/usr/bin/find ${REPOPATH} -name '*module*.yaml*' -not -name $MODULEFILE -delete
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment