#! /bin/sh
# use the patchutils' combinediff program to combine a 
# series of patches into one patch
# (not tested much)

set -e

p="`basename $0`-diff"
last="$1"
i=0
while test "$2"; do
      n=`expr $i % 2 | cat`
      combinediff "$last" "$2" > "$HOME/tmp/$p-$n"
      i=`expr $i + 1 | cat`
      last="$HOME/tmp/$p-$n"
      shift
done
cat "$last"
