From 02dc4a5f8c1979e9a23f7b6851f693d29b640c4d Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 21 Jan 2003 09:49:29 +0000 Subject: Version 0.11, from Andreas Gruenbacher --- needs-checking/ptkdiff | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 needs-checking/ptkdiff (limited to 'needs-checking/ptkdiff') 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 -- cgit