Also generate checksums for torrent files

This commit is contained in:
Steve McIntyre 2018-02-15 16:17:57 +00:00
parent c92f55d2b4
commit 9754353070
1 changed files with 17 additions and 14 deletions

View File

@ -26,14 +26,14 @@ for SUM in $CHECKSUMS; do
:> $FILE
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 -o -name \*.template -o -name \*.iso); do
# Ordering is important in the "find" call here - we *really* want to
# get the jigdo files before the iso files, so we can use the
# checksums there first instead of re-calculating them
for file in $(find * \
-name '*.jigdo' -o -name '*.template' \
-o -name '*.iso' -o -name '*.torrent'); do
iso=""
case $file in
*.template)
JIGDO=1
;;
*.jigdo)
iso=${file%%.jigdo}.iso
JIGDO=1
@ -42,6 +42,8 @@ for file in $(find * -name \*.jigdo -o -name \*.template -o -name \*.iso); do
iso=$file
JIGDO=0
;;
*.template|*.torrent)
;;
*)
echo "Found unexpected file $file!"
exit 1
@ -73,12 +75,13 @@ for file in $(find * -name \*.jigdo -o -name \*.template -o -name \*.iso); do
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
# Also add the template, jigdo and torrent files to the SUMS,
# if they exist
case $file in
*.template|*.jigdo|*.torrent)
$CMD $file >> $FILE
grep $file $FILE
;;
esac
done
done