make the lookup details case-insensitive

This commit is contained in:
Steve McIntyre 2009-05-11 00:05:56 +00:00
parent 5dd663686e
commit 1203b68413
1 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ if [ "$2"x != ""x ] ; then
EXT="$2"
fi
CHECKSUMS="sha1 md5" # sha512 sha256
CHECKSUMS="sha512 sha256 sha1 md5"
for SUM in $CHECKSUMS; do
UPSUM=`echo $SUM | tr 'a-z' 'A-Z'`
@ -36,14 +36,14 @@ for file in `find * -name \*.jigdo` `find * -name \*.iso`; do
for SUM in $CHECKSUMS; do
UPSUM=`echo $SUM | tr 'a-z' 'A-Z'`
FILE=$UPSUM"SUMS"$EXT
SEARCH="$UPSUM"Sum
CMD="$SUM"sum
grep -q $iso $FILE
if [ $? -ne 0 ] ; then
CKSUM=""
if [ "$JIGDO" == 1 ] ; then
CKSUM=`zcat -f $file | awk "/Image Hex $SEARCH/ {print \\$5}"`
CKSUM=`zcat -f $file | grep -i "Image Hex $CMD" | \
awk '{print $5}'`
fi
if [ "$CKSUM"x != ""x ] ; then
echo "$CKSUM $iso" >> $FILE