26 lines
530 B
Bash
Executable File
26 lines
530 B
Bash
Executable File
#!/bin/sh
|
|
|
|
SM_DEST=$1
|
|
shift
|
|
|
|
if ! test -d $SM_DEST; then
|
|
echo "SM_DEST $SM_DEST does not exist";
|
|
fi
|
|
|
|
if ! test -d $SM_DEST/patches; then
|
|
mkdir $SM_DEST/patches
|
|
fi
|
|
|
|
./symlink-tree preserve $SM_DEST
|
|
|
|
for SM_SRC in $*; do
|
|
patchname=`echo $SM_SRC | sed 's/.*\.//`
|
|
echo "Generating new \"$patchname\" patch for $SM_DEST tree"
|
|
./clobber-tree $SM_SRC
|
|
|
|
diff -c -N -r -xpatches -x.symlinks $SM_DEST $SM_SRC | \
|
|
grep -v "Only in $SM_DEST: patches" > $SM_DEST/patches/patch.$patchname
|
|
done
|
|
|
|
./symlink-tree restore $SM_DEST
|