about summary refs log tree commit diff
path: root/patch/bdiff.sh
blob: 33d109bd8cbbd116c523b59acbb173c4846f69ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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