Backport from master: List jigdo and template files in SUMS files too

This commit is contained in:
Steve McIntyre 2018-02-11 21:13:56 +00:00
parent 6bac9fdd66
commit f97866189b
2 changed files with 27 additions and 12 deletions

1
debian/changelog vendored
View File

@ -30,6 +30,7 @@ debian-cd (3.1.17-jessie) UNRELEASED; urgency=medium
+ Make tools/update_popcon deal with https on popcon.d.o
+ Declare 'my' instances of '$_' as 'local' in tools/make_disc_trees.pl
+ Ensure that in all places where we use -J we also use -joliet-long
+ List jigdo and template files in SUMS files too
-- Steve McIntyre <93sam@debian.org> Mon, 20 Apr 2015 12:36:57 +0100

View File

@ -18,7 +18,7 @@ if [ "$CHECKSUMS"x = ""x ] ; then
fi
for SUM in $CHECKSUMS; do
UPSUM=`echo $SUM | tr 'a-z' 'A-Z'`
UPSUM=$(echo $SUM | tr 'a-z' 'A-Z')
FILE=$UPSUM"SUMS"$EXT
if [ $VERBOSE -eq 1 ] ; then
echo "Clearing $PWD/$FILE"
@ -28,8 +28,12 @@ done
# 2 calls to find here to get the ordering right - we *really* want to
# get the jigdo files first
for file in `find * -name \*.jigdo` `find * -name \*.iso`; do
for file in $(find * -name \*.jigdo -o -name \*.template -o -name \*.iso); do
iso=""
case $file in
*.template)
JIGDO=1
;;
*.jigdo)
iso=${file%%.jigdo}.iso
JIGDO=1
@ -45,16 +49,18 @@ for file in `find * -name \*.jigdo` `find * -name \*.iso`; do
esac
for SUM in $CHECKSUMS; do
UPSUM=`echo $SUM | tr 'a-z' 'A-Z'`
UPSUM=$(echo $SUM | tr 'a-z' 'A-Z')
FILE=$UPSUM"SUMS"$EXT
CMD="$SUM"sum
if [ "$iso"x != ""x ]; then
grep -q $iso $FILE
if [ $? -ne 0 ] ; then
CKSUM=""
if [ "$JIGDO" == 1 ] ; then
CKSUM=`zcat -f $file | grep -i "Image Hex $CMD" | \
awk '{print $5}'`
CKSUM=$(zcat -f $file | \
grep -i "Image Hex $CMD" | \
awk '{print $5}')
fi
if [ "$CKSUM"x != ""x ] ; then
echo "$CKSUM $iso" >> $FILE
@ -65,6 +71,14 @@ for file in `find * -name \*.jigdo` `find * -name \*.iso`; do
grep $iso $FILE
fi
fi
fi
# Also add the template file and jigdo file to the SUMS, if they exist
case $file in
*.template|*.jigdo)
$CMD $file >> $FILE
grep $file $FILE
;;
esac
done
done