diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2008-09-17 08:04:18 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2008-09-17 08:04:18 +0000 |
commit | 843deb295c2fe5c9ac8b6b268c2c1eda37478d9e (patch) | |
tree | 0c7622e952849dc5f67c8dc921c8af4f5fbed04a | |
parent | d6e5527cc97a0b3f5a1ae1c52d06c61f4b3685cf (diff) |
- when merging a file, add a key to see a diff between the merged file
and the new or old one
requested by todd@ months ago
"I like the idea" fgsch@, "should be in" todd@
-rw-r--r-- | usr.sbin/sysmerge/sysmerge.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh index 188859c4f0d..2e47c575cdd 100644 --- a/usr.sbin/sysmerge/sysmerge.sh +++ b/usr.sbin/sysmerge/sysmerge.sh @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: sysmerge.sh,v 1.24 2008/09/12 13:31:59 ajacoutot Exp $ +# $OpenBSD: sysmerge.sh,v 1.25 2008/09/17 08:04:17 ajacoutot Exp $ # # This script is based on the FreeBSD mergemaster script, written by # Douglas Barton <DougB@FreeBSD.org> @@ -206,6 +206,8 @@ merge_loop() { while [ "${INSTALL_MERGED}" = "v" ]; do echo "" echo " Use 'i' to install merged file" + echo " Use 'n' to view a diff between the merged and new files" + echo " Use 'o' to view a diff between the old and merged files" echo " Use 'r' to re-do the merge" echo " Use 'v' to view the merged file" echo " Default is to leave the temporary file to deal with by hand" @@ -223,6 +225,16 @@ merge_loop() { fi unset MERGE_AGAIN ;; + [nN]) + echo "comparison between merged and new files:\n" + diff -u ${COMPFILE}.merged ${COMPFILE} + INSTALL_MERGED=v + ;; + [oO]) + echo "comparison between old and merged files:\n" + diff -u ${DESTDIR}${COMPFILE#.} ${COMPFILE}.merged + INSTALL_MERGED=v + ;; [rR]) rm "${COMPFILE}.merged" ;; |