From 89ccff0bf0fd01d48bd3d9c731173e133349d8d9 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Thu, 15 Feb 2018 16:18:21 +0000 Subject: [PATCH] Re-indent to clean up --- tools/imagesums | 58 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/tools/imagesums b/tools/imagesums index c1c5ffe7..162df8b4 100755 --- a/tools/imagesums +++ b/tools/imagesums @@ -18,12 +18,12 @@ if [ "$CHECKSUMS"x = ""x ] ; then fi for SUM in $CHECKSUMS; do - UPSUM=$(echo $SUM | tr 'a-z' 'A-Z') - FILE=$UPSUM"SUMS"$EXT - if [ $VERBOSE -eq 1 ] ; then - echo "Clearing $PWD/$FILE" - fi - :> $FILE + UPSUM=$(echo $SUM | tr 'a-z' 'A-Z') + FILE=$UPSUM"SUMS"$EXT + if [ $VERBOSE -eq 1 ] ; then + echo "Clearing $PWD/$FILE" + fi + :> $FILE done # Ordering is important in the "find" call here - we *really* want to @@ -50,30 +50,30 @@ for file in $(find * \ ;; esac - for SUM in $CHECKSUMS; do - UPSUM=$(echo $SUM | tr 'a-z' 'A-Z') - FILE=$UPSUM"SUMS"$EXT - CMD="$SUM"sum + for SUM in $CHECKSUMS; do + UPSUM=$(echo $SUM | tr 'a-z' 'A-Z') + FILE=$UPSUM"SUMS"$EXT + CMD="$SUM"sum - if [ "$iso"x != ""x ]; then - grep -q $iso $FILE - if [ $? -ne 0 ] ; then - CKSUM="" - if [ "$JIGDO" == 1 ] ; then - CKSUM=$(zcat -f $file | \ - grep -i "Image Hex $CMD" | \ - awk '{print $5}') - fi - if [ "$CKSUM"x != ""x ] ; then - echo "$CKSUM $iso" >> $FILE - grep $iso $FILE - else - echo "No Jigdo help for $SUM, doing it the long way with $CMD" - $CMD $iso >> $FILE - grep $iso $FILE - fi - fi - fi + if [ "$iso"x != ""x ]; then + grep -q $iso $FILE + if [ $? -ne 0 ] ; then + CKSUM="" + if [ "$JIGDO" == 1 ] ; then + CKSUM=$(zcat -f $file | \ + grep -i "Image Hex $CMD" | \ + awk '{print $5}') + fi + if [ "$CKSUM"x != ""x ] ; then + echo "$CKSUM $iso" >> $FILE + grep $iso $FILE + else + echo "No Jigdo help for $SUM, doing it the long way with $CMD" + $CMD $iso >> $FILE + grep $iso $FILE + fi + fi + fi # Also add the template, jigdo and torrent files to the SUMS, # if they exist