Date: Sat, 5 Feb 2011 06:25:21 +0000 (UTC) From: Gordon Tetlow <gordon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r218312 - stable/8/usr.sbin/freebsd-update Message-ID: <201102050625.p156PLaC017099@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gordon Date: Sat Feb 5 06:25:21 2011 New Revision: 218312 URL: http://svn.freebsd.org/changeset/base/218312 Log: MFC r217767: Honor $PAGER instead of always calling more. Approved by: colin@ Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Sat Feb 5 03:36:34 2011 (r218311) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Sat Feb 5 06:25:21 2011 (r218312) @@ -1860,7 +1860,7 @@ fetch_create_manifest () { echo -n "been downloaded because the files have been " echo "modified locally:" cat modifiedfiles - fi | more + fi | $PAGER rm modifiedfiles # If no files will be updated, tell the user and exit @@ -1890,7 +1890,7 @@ fetch_create_manifest () { echo -n "The following files will be removed " echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" cat files.removed - fi | more + fi | $PAGER rm files.removed # Report added files, if any @@ -1899,7 +1899,7 @@ fetch_create_manifest () { echo -n "The following files will be added " echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" cat files.added - fi | more + fi | $PAGER rm files.added # Report updated files, if any @@ -1909,7 +1909,7 @@ fetch_create_manifest () { echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" cat files.updated - fi | more + fi | $PAGER rm files.updated # Create a directory for the install manifest. @@ -3183,6 +3183,11 @@ cmd_IDS () { # Make sure we find utilities from the base system export PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PATH} +# Set a pager if the user doesn't +if [ -z "$PAGER" ]; then + PAGER=/usr/bin/more +fi + # Set LC_ALL in order to avoid problems with character ranges like [A-Z]. export LC_ALL=C
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102050625.p156PLaC017099>