Also generate checksums for torrent files
This commit is contained in:
parent
c92f55d2b4
commit
9754353070
|
@ -26,14 +26,14 @@ for SUM in $CHECKSUMS; do
|
||||||
:> $FILE
|
:> $FILE
|
||||||
done
|
done
|
||||||
|
|
||||||
# 2 calls to find here to get the ordering right - we *really* want to
|
# Ordering is important in the "find" call here - we *really* want to
|
||||||
# get the jigdo files first
|
# get the jigdo files before the iso files, so we can use the
|
||||||
for file in $(find * -name \*.jigdo -o -name \*.template -o -name \*.iso); do
|
# 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=""
|
iso=""
|
||||||
case $file in
|
case $file in
|
||||||
*.template)
|
|
||||||
JIGDO=1
|
|
||||||
;;
|
|
||||||
*.jigdo)
|
*.jigdo)
|
||||||
iso=${file%%.jigdo}.iso
|
iso=${file%%.jigdo}.iso
|
||||||
JIGDO=1
|
JIGDO=1
|
||||||
|
@ -42,6 +42,8 @@ for file in $(find * -name \*.jigdo -o -name \*.template -o -name \*.iso); do
|
||||||
iso=$file
|
iso=$file
|
||||||
JIGDO=0
|
JIGDO=0
|
||||||
;;
|
;;
|
||||||
|
*.template|*.torrent)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Found unexpected file $file!"
|
echo "Found unexpected file $file!"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -73,9 +75,10 @@ for file in $(find * -name \*.jigdo -o -name \*.template -o -name \*.iso); do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Also add the template file and jigdo file to the SUMS, if they exist
|
# Also add the template, jigdo and torrent files to the SUMS,
|
||||||
|
# if they exist
|
||||||
case $file in
|
case $file in
|
||||||
*.template|*.jigdo)
|
*.template|*.jigdo|*.torrent)
|
||||||
$CMD $file >> $FILE
|
$CMD $file >> $FILE
|
||||||
grep $file $FILE
|
grep $file $FILE
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue