mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
* Proof-of-concept for binary patch deployment.
This commit is contained in:
parent
f17553a212
commit
eee6fe478e
1 changed files with 31 additions and 0 deletions
31
patch/bdiff.sh
Executable file
31
patch/bdiff.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue