LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File pre_checkin.sh of Package SLES12-SP3-EC2-HVM-BYOS (Project SUSE:Templates:Images:SLE-12-SP3:AWS)

#!/bin/sh
#
# Remove Devel: repository reference upon check-in

for i in *.kiwi
do
awk '
   /<repository type="rpm-md">/ {rec=""; on_rep=1} 
   { if (on_rep){ rec = rec $0 ORS } else { print } }
   /<\/repository>/ {
      if (on_rep && (rec !~ "obs://Devel:"))
         printf "%s",rec
      on_rep=0
   }
' ${i} > ${i}.tmp
mv ${i}.tmp ${i}
done