From eee6fe478e5a0275b2da382216a5b8ec24e04290 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 29 Nov 2004 19:12:55 +0000 Subject: [PATCH] * Proof-of-concept for binary patch deployment. --- patch/bdiff.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 patch/bdiff.sh diff --git a/patch/bdiff.sh b/patch/bdiff.sh new file mode 100755 index 000000000..33d109bd8 --- /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