diff options
author | Martin Quinson <mquinson@debian.org> | 2003-01-21 09:49:29 +0000 |
---|---|---|
committer | Martin Quinson <mquinson@debian.org> | 2003-01-21 09:49:29 +0000 |
commit | 02dc4a5f8c1979e9a23f7b6851f693d29b640c4d (patch) | |
tree | 2f397f5df89f4529b89fd0e7a021238d0f290007 /needs-checking/ptkdiff | |
parent | 4d11e99bfc25e0261111d202a3a2afdf97daea5c (diff) | |
download | quilt-02dc4a5f8c1979e9a23f7b6851f693d29b640c4d.tar.gz |
Version 0.11, from Andreas Gruenbacher
Diffstat (limited to 'needs-checking/ptkdiff')
-rwxr-xr-x | needs-checking/ptkdiff | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/needs-checking/ptkdiff b/needs-checking/ptkdiff new file mode 100755 index 0000000..a965bdd --- /dev/null +++ b/needs-checking/ptkdiff @@ -0,0 +1,49 @@ +#!/bin/sh + +# +# Bring up a patched file in tkdiff. We show the diffs +# in the topmost patch, unless it was specified +# + +. patchfns 2>/dev/null || +. /usr/lib/patch-scripts/patchfns 2>/dev/null || +. $PATCHSCRIPTS_LIBDIR/patchfns 2>/dev/null || +{ + echo "Impossible to find my library 'patchfns'." + echo "Check your install, or go to the right directory" + exit 1 +} + +usage() +{ + echo "Usage: ptkdiff filename ..." + echo " ptkdiff -" + exit 1 +} + +PATCH_NAME=$(top_patch) + +doit() +{ + filename=$1 + unpatched_file=$(backup_file_name $filename $PATCH_NAME) + need_file_there $filename + if [ -e $unpatched_file ] + then + tkdiff $unpatched_file $filename + else + echo ptkdiff: $filename appears to not be in $PATCH_NAME + fi +} + +if [ x"$1" = "x-" ] +then + FILENAME=$(files_in_patch $PATCH_NAME) +else + FILENAME="$*" +fi + +for i in $FILENAME +do + doit $i & +done |