summaryrefslogtreecommitdiff
path: root/ucf
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2005-09-20 19:55:30 +0000
committerManoj Srivastava <srivasta@debian.org>2005-09-20 19:55:30 +0000
commit67b02ed7482a570190c1ddf26de85bece5c8f3b1 (patch)
treefba6109cca4d969560abd8f20d650a95e9eccb9c /ucf
parent09f0851c2cbffab964c3ed6923d21775e02c45ed (diff)
Added support for side-by-side diffs
* ucf: Added support for side-by-side diffs, This is very similar to doing a standard diff, apart from calling sdiff instead (and change the option switches around as needed. git-archimport-id: srivasta@debian.org--etch/ucf--devel--2.0--patch-5
Diffstat (limited to 'ucf')
-rwxr-xr-xucf15
1 files changed, 15 insertions, 0 deletions
diff --git a/ucf b/ucf
index 98c027b..f64adbb 100755
--- a/ucf
+++ b/ucf
@@ -107,6 +107,7 @@ pversion='$Revision: 1.26 $'
choice_install_new="install the package maintainer's version"
choice_keep_current="keep your currently-installed version"
choice_diff="show the differences between the versions"
+choice_sdiff="show a side-by-side difference between the versions"
choice_diff_threeway="show a 3 way difference between available versions of the file"
choice_merge_threeway="do a 3 way merge between available versions of the file [Very Experimental]"
choice_shell="start a new shell to examine the situation"
@@ -802,6 +803,7 @@ Configuration file \`$dest_file'
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
+ S : show the side-by-side differences between the versions
EOPRMT
if [ "X$THREEWAY" != "X" -a -e "$statedir/cache/$cached_file" ]; then
cat >&2 <<EOTD
@@ -845,6 +847,19 @@ EOPEND
read -e ANSWER </dev/tty
fi
;;
+ "$choice_sdiff"|S|s)
+ if [ -e "$dest_file" ]; then
+ ( sdiff -BbW "$dest_file" "$new_file" | \
+ sensible-pager ) </dev/tty >/dev/tty
+ else
+ ( sdiff -BbW /dev/null "$new_file" | \
+ sensible-pager ) </dev/tty >/dev/tty
+ fi
+ if [ "X$STOP" != "X" ]; then
+ echo >&2 "Please hit enter to continue";
+ read -e ANSWER </dev/tty
+ fi
+ ;;
"$choice_diff_threeway"|3|t|T)
if [ -e "$statedir/cache/$cached_file" \
-a "X$THREEWAY" != "X" ]; then