From owner-freebsd-stable Sun Oct 13 19: 2:40 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79CB137B401 for ; Sun, 13 Oct 2002 19:02:37 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AABB43E9C for ; Sun, 13 Oct 2002 19:02:37 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.4) with ESMTP id g9E22XPQ058349; Sun, 13 Oct 2002 19:02:33 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g9E22WAV058348; Sun, 13 Oct 2002 19:02:32 -0700 (PDT) (envelope-from dillon) Date: Sun, 13 Oct 2002 19:02:32 -0700 (PDT) From: Matthew Dillon Message-Id: <200210140202.g9E22WAV058348@apollo.backplane.com> To: "Crist J. Clark" Cc: Trish Lynch , Adrian Wontroba , chris scott , freebsd-stable@FreeBSD.ORG Subject: Re: Ifconfig config of gif tunnels References: <20021013172810.A19177@titus.hanley.stade.co.uk> <20021013130138.G523-100000@femme.sapphite.org> <20021013214642.GB90169@blossom.cjclark.org> <200210132154.g9DLsUmc057065@apollo.backplane.com> <20021013225509.GA90575@blossom.cjclark.org> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :I've always felt lists of "default clobbers" and "default skips" would :be nice to have. : :> (2) It cleared the window before each presentation, so I don't :> have to search around the window to find the filename and/or :> diff that it's currently asking me to do something about :> (this is especially annoying for small files). : :How 'bout, :Index: mergemaster.sh :=================================================================== :RCS file: /export/freebsd/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v :retrieving revision 1.37 :diff -u -r1.37 mergemaster.sh :--- mergemaster.sh 5 Aug 2002 08:47:52 -0000 1.37 :+++ mergemaster.sh 13 Oct 2002 22:52:50 -0000 :@@ -111,9 +111,7 @@ : "${HANDLE_COMPFILE}" = "NOT V" ]; do : if [ -f "${DESTDIR}${COMPFILE#.}" -a -f "${COMPFILE}" ]; then : if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then :- echo '' :- echo ' ====================================================================== ' :- echo '' :+ clear : ( :... Hmm. It has to be somewhat more complex. See below. :> (3) It didn't try to display the whole diff initially, causing :> a pipe-to-(less or more) that I then have to quit out of :> before I can tell it to install / delete. Blech. : :What would you like it to do here? Nothing better leaps to my :mind. Having to do something to see the diff seems even more annoying :to me. :-- :Crist J. Clark | cjclark@alum.mit.edu : | cjclark@jhu.edu :http://people.freebsd.org/~cjc/ | cjc@freebsd.org Hmm. Slightly more complex. Here's a patch representing some of my idea. It needs a little work but it's fairly close. (patch is against -stable) -Matt Matthew Dillon Index: mergemaster.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v retrieving revision 1.6.2.14 diff -u -r1.6.2.14 mergemaster.sh --- mergemaster.sh 30 Jun 2002 19:01:35 -0000 1.6.2.14 +++ mergemaster.sh 14 Oct 2002 02:00:51 -0000 @@ -12,6 +12,9 @@ PATH=/bin:/usr/bin:/usr/sbin +# XXX set to number of rows on terminal minus 8 +DIFFROWS=16 + display_usage () { VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` echo "mergemaster version ${VERSION_NUMBER}" @@ -106,24 +109,34 @@ 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-79 | head -${DIFFROWS} + echo '...' + else + clear + ( + echo " *** Displaying differences between ${COMPFILE} and installed version:" + echo '' + diff "${DIFF_FLAG}" "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" + ) | ${PAGER} + echo '...' + fi echo '' - echo ' ====================================================================== ' - echo '' - ( - echo '' - echo " *** Displaying differences between ${COMPFILE} and installed version:" - echo '' - diff "${DIFF_FLAG}" "${DESTDIR}${COMPFILE#.}" "${COMPFILE}" - ) | ${PAGER} - echo '' + FIRST_TIME=n fi else - echo '' + clear echo " *** There is no installed version of ${COMPFILE}" echo '' case "${AUTO_INSTALL}" in To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message