common/bin/compare.sh
changeset 32811 df82db312e58
parent 31310 481585782338
child 32812 7a2d9c874229
equal deleted inserted replaced
32569:a63d10163947 32811:df82db312e58
   588     $LN -f -s $OTHER_FILE $WORK_FILE_BASE.other
   588     $LN -f -s $OTHER_FILE $WORK_FILE_BASE.other
   589 
   589 
   590     ORIG_THIS_FILE="$THIS_FILE"
   590     ORIG_THIS_FILE="$THIS_FILE"
   591     ORIG_OTHER_FILE="$OTHER_FILE"
   591     ORIG_OTHER_FILE="$OTHER_FILE"
   592 
   592 
   593     if [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
   593     if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
   594         THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME
   594         THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME
   595         OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME
   595         OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME
   596         $MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other
   596         $MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other
   597         $CP $THIS_FILE $THIS_STRIPPED_FILE
   597         $CP $THIS_FILE $THIS_STRIPPED_FILE
   598         $CP $OTHER_FILE $OTHER_STRIPPED_FILE
   598         $CP $OTHER_FILE $OTHER_STRIPPED_FILE
  1013     echo "-execs              Compare all executables"
  1013     echo "-execs              Compare all executables"
  1014     echo "-v                  Verbose output, does not hide known differences"
  1014     echo "-v                  Verbose output, does not hide known differences"
  1015     echo "-vv                 More verbose output, shows diff output of all comparisons"
  1015     echo "-vv                 More verbose output, shows diff output of all comparisons"
  1016     echo "-o [OTHER]          Compare with build in other directory. Will default to the old build directory"
  1016     echo "-o [OTHER]          Compare with build in other directory. Will default to the old build directory"
  1017     echo ""
  1017     echo ""
       
  1018     echo "--strip             Strip all binaries before comparing"
       
  1019     echo ""
  1018     echo "[FILTER]            List filenames in the image to compare, works for jars, zips, libs and execs"
  1020     echo "[FILTER]            List filenames in the image to compare, works for jars, zips, libs and execs"
  1019     echo "Example:"
  1021     echo "Example:"
  1020     echo "bash ./common/bin/compareimages.sh CodePointIM.jar"
  1022     echo "bash ./common/bin/compareimages.sh CodePointIM.jar"
  1021     echo ""
  1023     echo ""
  1022     echo "-2zips <file1> <file2> Compare two zip files only"
  1024     echo "-2zips <file1> <file2> Compare two zip files only"
  1104             CMP_2_BINS=true
  1106             CMP_2_BINS=true
  1105             THIS_FILE=$2
  1107             THIS_FILE=$2
  1106             OTHER_FILE=$3
  1108             OTHER_FILE=$3
  1107             shift
  1109             shift
  1108             shift
  1110             shift
       
  1111             ;;
       
  1112         --strip)
       
  1113             STRIP_ALL=true
  1109             ;;
  1114             ;;
  1110         *)
  1115         *)
  1111             CMP_NAMES=false
  1116             CMP_NAMES=false
  1112             CMP_PERMS=false
  1117             CMP_PERMS=false
  1113             CMP_TYPES=false
  1118             CMP_TYPES=false