#!/bin/sh # the nethack source tarball src=$1 # should be a clean version of the Nethack sources ref=$2 # your working directory, with your changes work=$3 echo $0: cd .. >&2 cd .. [ -e $src ] || { echo $0: $src is missing >&2; exit 1; } [ -d $work ] || { echo $0: $work/ is missing >&2; exit 1; } [ -e $ref ] && { echo $0: $ref/ is in the way >&2; exit 1; } echo $0: untarring $src >&2 tar -xzf $src echo $0: generating patch >&2 # the patch is distributed under a modified BSD license cat <&2 diff -u $s $work/$n done echo $0: removing $ref/ >&2 rm -r $ref