Backport from master: List jigdo and template files in SUMS files too
This commit is contained in:
parent
9739df55f6
commit
877e113fa9
|
@ -8,6 +8,7 @@ debian-cd (3.1.21-stretch) UNRELEASED; urgency=medium
|
||||||
+ Make tools/update_popcon exit with errors when it fails
|
+ Make tools/update_popcon exit with errors when it fails
|
||||||
+ Make tools/update_popcon deal with https on popcon.d.o
|
+ Make tools/update_popcon deal with https on popcon.d.o
|
||||||
+ Ensure that in all places where we use -J we also use -joliet-long
|
+ 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, 19 Jun 2017 13:39:58 +0100
|
-- Steve McIntyre <93sam@debian.org> Mon, 19 Jun 2017 13:39:58 +0100
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ if [ "$CHECKSUMS"x = ""x ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for SUM in $CHECKSUMS; do
|
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
|
FILE=$UPSUM"SUMS"$EXT
|
||||||
if [ $VERBOSE -eq 1 ] ; then
|
if [ $VERBOSE -eq 1 ] ; then
|
||||||
echo "Clearing $PWD/$FILE"
|
echo "Clearing $PWD/$FILE"
|
||||||
|
@ -28,8 +28,12 @@ done
|
||||||
|
|
||||||
# 2 calls to find here to get the ordering right - we *really* want to
|
# 2 calls to find here to get the ordering right - we *really* want to
|
||||||
# get the jigdo files first
|
# 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
|
case $file in
|
||||||
|
*.template)
|
||||||
|
JIGDO=1
|
||||||
|
;;
|
||||||
*.jigdo)
|
*.jigdo)
|
||||||
iso=${file%%.jigdo}.iso
|
iso=${file%%.jigdo}.iso
|
||||||
JIGDO=1
|
JIGDO=1
|
||||||
|
@ -45,26 +49,36 @@ for file in `find * -name \*.jigdo` `find * -name \*.iso`; do
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for SUM in $CHECKSUMS; do
|
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
|
FILE=$UPSUM"SUMS"$EXT
|
||||||
CMD="$SUM"sum
|
CMD="$SUM"sum
|
||||||
|
|
||||||
grep -q $iso $FILE
|
if [ "$iso"x != ""x ]; then
|
||||||
if [ $? -ne 0 ] ; then
|
grep -q $iso $FILE
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
CKSUM=""
|
CKSUM=""
|
||||||
if [ "$JIGDO" == 1 ] ; then
|
if [ "$JIGDO" == 1 ] ; then
|
||||||
CKSUM=`zcat -f $file | grep -i "Image Hex $CMD" | \
|
CKSUM=$(zcat -f $file | \
|
||||||
awk '{print $5}'`
|
grep -i "Image Hex $CMD" | \
|
||||||
|
awk '{print $5}')
|
||||||
fi
|
fi
|
||||||
if [ "$CKSUM"x != ""x ] ; then
|
if [ "$CKSUM"x != ""x ] ; then
|
||||||
echo "$CKSUM $iso" >> $FILE
|
echo "$CKSUM $iso" >> $FILE
|
||||||
grep $iso $FILE
|
grep $iso $FILE
|
||||||
else
|
else
|
||||||
echo "No Jigdo help for $SUM, doing it the long way with $CMD"
|
echo "No Jigdo help for $SUM, doing it the long way with $CMD"
|
||||||
$CMD $iso >> $FILE
|
$CMD $iso >> $FILE
|
||||||
grep $iso $FILE
|
grep $iso $FILE
|
||||||
fi
|
fi
|
||||||
|
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
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue