diff options
author | dillon <dillon@FreeBSD.org> | 2003-01-28 18:44:40 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2003-01-28 18:44:40 +0000 |
commit | e0d4d79d7c723984d0de5df59f77ec507877ee0c (patch) | |
tree | 639a274067e358aca7d7192ef9345eca6a73ada7 /usr.sbin/mergemaster/mergemaster.sh | |
parent | ad53dde459a8ec56479089c08dc00f21e6029f70 (diff) | |
download | FreeBSD-src-e0d4d79d7c723984d0de5df59f77ec507877ee0c.zip FreeBSD-src-e0d4d79d7c723984d0de5df59f77ec507877ee0c.tar.gz |
Backout last commit by request.
Diffstat (limited to 'usr.sbin/mergemaster/mergemaster.sh')
-rwxr-xr-x | usr.sbin/mergemaster/mergemaster.sh | 55 |
1 files changed, 11 insertions, 44 deletions
diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh index 5b20b05..d2f1f90 100755 --- a/usr.sbin/mergemaster/mergemaster.sh +++ b/usr.sbin/mergemaster/mergemaster.sh @@ -12,30 +12,6 @@ PATH=/bin:/usr/bin:/usr/sbin -# Figure out the number of columns and rows on the -# terminal. Use 80x24 if there is any doubt. -# -if test -t 0; then - DIFFROWS=`stty size | awk '{ print $1; }'` - DIFFCOLS=`stty size | awk '{ print $2; }'` - if [ -z "$DIFFCOLS" ]; then - DIFFCOLS=80 - fi - if [ -z "$DIFFROWS" ]; then - DIFFROWS=24 - fi - if [ $DIFFROWS -le 0 ]; then - DIFFROWS=24 - fi - if [ $DIFFCOLS -le 0 ]; then - DIFFCOLS=80 - fi -else - DIFFCOLS=80 - DIFFROWS=24 -fi -DIFFROWS=$(($DIFFROWS - 8)) -DIFFCOLS=$(($DIFFCOLS - 1)) display_usage () { VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` echo "mergemaster version ${VERSION_NUMBER}" @@ -130,33 +106,24 @@ merge_loop () { diff_loop () { HANDLE_COMPFILE=v - FIRST_TIME=y while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o \ "${HANDLE_COMPFILE}" = "NOT V" ]; do if [ -f "${DESTDIR}${COMPFILE#.}" -a -f "${COMPFILE}" ]; then if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then - if [ "$FIRST_TIME" = "y" ]; then - clear - ( - echo " *** Displaying differences between ${COMPFILE} and installed version:" - echo '' - diff "${DIFF_FLAG}" "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" - ) | cut -b 1-${DIFFCOLS} | head -${DIFFROWS} - echo '...' - else - clear - ( - echo " *** Displaying differences between ${COMPFILE} and installed version:" - echo '' - diff "${DIFF_FLAG}" "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" - ) | ${PAGER} - fi echo '' - FIRST_TIME=n + echo ' ====================================================================== ' + echo '' + ( + echo '' + echo " *** Displaying differences between ${COMPFILE} and installed version:" + echo '' + diff "${DIFF_FLAG}" "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" + ) | ${PAGER} + echo '' fi else - clear + echo '' echo " *** There is no installed version of ${COMPFILE}" echo '' case "${AUTO_INSTALL}" in @@ -184,7 +151,7 @@ diff_loop () { case "${NO_INSTALLED}" in '') echo " Use 'm' to merge the temporary and installed versions" - echo " Use 'v' to view the entire diff results" + echo " Use 'v' to view the diff results again" ;; esac echo '' |