diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-11-29T19·12+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-11-29T19·12+0000 |
commit | eee6fe478e5a0275b2da382216a5b8ec24e04290 (patch) | |
tree | aa3e5c224985df8372088e514368479de64dbe54 | |
parent | f17553a212e726abdfc96af5657968c24a829d0d (diff) |
* Proof-of-concept for binary patch deployment.
-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 |