diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-12-31T11·07+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-12-31T11·07+0000 |
commit | f28ea27d83741caf38b8ac7de317d13a2904f54a (patch) | |
tree | 19b9f281cfeb374c3c8c7f049e512ee08dbd3625 | |
parent | c53898cb650d14f9d888e28e48496e15db00fb47 (diff) |
* Remove old stuff.
-rwxr-xr-x | patch/bdiff.sh | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/patch/bdiff.sh b/patch/bdiff.sh deleted file mode 100755 index 1a4381529468..000000000000 --- a/patch/bdiff.sh +++ /dev/null @@ -1,59 +0,0 @@ -#! /bin/sh -e - -#DIFF=zdc -DIFF=bsdiff - -srcA=$1 -srcB=$2 - -if test -z "$srcA" -o -z "$srcB"; then - echo "syntax: bdiff.sh srcA srcB" - exit 1 -fi - -(cd $srcB && find . -type f) | while read fn; do - - if test -f "$srcA/$fn"; then - - if ! test -f "$srcB/$fn"; then - echo "DELETE $fn" - else - - if ! cmp "$srcA/$fn" "$srcB/$fn" > /dev/null; then - - echo "FILE DELTA FOR $fn" - - TMPFILE=/tmp/__bsdiff - $DIFF "$srcA/$fn" "$srcB/$fn" $TMPFILE - cat $TMPFILE - - diffSize=$(stat -c '%s' $TMPFILE) - - # For comparison. - bzipSize=$(bzip2 < "$srcB/$fn" | wc -m) - - gain=$(echo "scale=2; ($diffSize - $bzipSize) / $bzipSize * 100" | bc) - - ouch=$(if test "${gain:0:1}" != "-"; then echo "!"; fi) - - printf "%7.2f %1s %10d %10d %s\n" \ - "$gain" "$ouch" "$diffSize" "$bzipSize" "$fn" >&2 -# echo "$fn -> $diffSize $bzipSize ==> $gain $ouch" >&2 - - rm $TMPFILE - - fi - - fi - - # Note: be silent about unchanged files. - - else - - echo "NEW FILE $fn" - - cat "$srcB/$fn" - - fi - -done |