diff options
Diffstat (limited to 'patch/bdiff.sh')
-rwxr-xr-x | patch/bdiff.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/patch/bdiff.sh b/patch/bdiff.sh new file mode 100755 index 000000000000..33d109bd8cbb --- /dev/null +++ b/patch/bdiff.sh @@ -0,0 +1,31 @@ +#! /bin/sh -e + +DIFF=/home/eelco/Dev/nix/zdelta-2.1/zdc + +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 + + echo "$fn" >&2 + + if test -f "$srcA/$fn"; then + + echo "FILE DELTA FOR $fn" + + $DIFF "$srcA/$fn" "$srcB/$fn" + + else + + echo "NEW FILE $fn" + + cat "$srcB/$fn" + + fi + +done |