From 1203b6841366ac66d4260c155f9bbebd2fde0f70 Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Mon, 11 May 2009 00:05:56 +0000 Subject: [PATCH] make the lookup details case-insensitive --- tools/imagesums | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/imagesums b/tools/imagesums index f5122ad3..df57a44e 100755 --- a/tools/imagesums +++ b/tools/imagesums @@ -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