< prev index next >

common/bin/compare.sh

Print this page

        

@@ -507,10 +507,11 @@
     else
         DIFFING_FILES=$($GREP -e "differ$" $CONTENTS_DIFF_FILE \
             | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g")
     fi
 
+    if [ "$CMP_ZIPS_CONTENTS" = "true" ]; then
     $RM -f $WORK_DIR/$ZIP_FILE.diffs
     for file in $DIFFING_FILES; do
         if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then
             diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs
         fi

@@ -533,10 +534,11 @@
                     LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i
                 fi
             done
         fi
     fi
+    fi
 
     return $return_value
 }
 
 

@@ -1070,11 +1072,12 @@
     echo "-all                Compare all files in all known ways"
     echo "-names              Compare the file names and directory structure"
     echo "-perms              Compare the permission bits on all files and directories"
     echo "-types              Compare the output of the file command on all files"
     echo "-general            Compare the files not convered by the specialized comparisons"
-    echo "-zips               Compare the contents of all zip files"
+    echo "-zips               Compare the contents of all zip files and files in them"
+    echo "-zips-names         Compare the file names inside all zip files"
     echo "-jars               Compare the contents of all jar files"
     echo "-libs               Compare all native libraries"
     echo "-execs              Compare all executables"
     echo "-v                  Verbose output, does not hide known differences"
     echo "-vv                 More verbose output, shows diff output of all comparisons"

@@ -1098,10 +1101,11 @@
 CMP_NAMES=false
 CMP_PERMS=false
 CMP_TYPES=false
 CMP_GENERAL=false
 CMP_ZIPS=false
+CMP_ZIPS_CONTENTS=true
 CMP_JARS=false
 CMP_LIBS=false
 CMP_EXECS=false
 
 while [ -n "$1" ]; do

@@ -1141,10 +1145,15 @@
         -general)
             CMP_GENERAL=true
             ;;
         -zips)
             CMP_ZIPS=true
+            CMP_ZIPS_CONTENTS=true
+            ;;
+        -zips-names)
+            CMP_ZIPS=true
+            CMP_ZIPS_CONTENTS=false
             ;;
         -jars)
             CMP_JARS=true
             ;;
         -libs)
< prev index next >