Support multiple ksplice modules in ksplice-apply.
[ksplice.git] / gendiff-reversed
blobdf24d705b2300b526426d48934828c784f22a00a
1 #!/bin/sh
3 # This version of gendiff has been modified for Ksplice.
4 # gendiff was originally written by Marc Ewing <marc@redhat.com>,
5 # and it is available under the GNU General Public License.
7 [ -z "$1" -o -z "$2" ] && {
8 # usage
9 echo "usage: $0 <directory> <diff-extension>" 1>&2
10 exit 1
13 find $1 \( -name "*$2" -o -name ".*$2" -o -regex ".*ksplice/post/.*" -prune \) -print |
14 while read f; do
15 U=-u
16 [ "`basename $f`" = "ChangeLog$2" ] && U=-U0
17 if [ -r "${f%$2}" ]; then
18 diff ${U} "${f%$2}" "${f}"
19 else
20 diff ${U} /dev/null "${f}"
22 done
24 exit 0