Mercurial > hg > octave-shane
changeset 5229:9b0ff1aefcbe
[project @ 2005-03-21 20:37:44 by jwe]
author | jwe |
---|---|
date | Mon, 21 Mar 2005 20:37:44 +0000 |
parents | 189fe4f85c77 |
children | 9ecae85335fa |
files | ChangeLog octave-bug.in |
diffstat | 2 files changed, 29 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-03-21 John W. Eaton <jwe@octave.org> + + * octave-bug.in: Try harder to find default pager (use code + similar to that used for finding default editor). + 2005-03-17 Shan G. Smith <shan@cybertrails.com> * configure.in: Move check for -lumfpack to after check for blas.
--- a/octave-bug.in +++ b/octave-bug.in @@ -90,7 +90,30 @@ : ${EDITOR=$DEFEDITOR} -: ${PAGER=more} +if [ -z "$DEFPAGER" ] && [ -z "$PAGER" ]; then + if [ -x /usr/bin/pager ]; then + DEFPAGER=pager + elif [ -x /usr/bin/less ]; then + DEFPAGER=less + elif [ -x /usr/bin/less ]; then + DEFPAGER=less + elif [ -x /usr/local/bin/less ]; then + DEFPAGER=less + elif [ -x /usr/bin/more ]; then + DEFPAGER=more + elif [ -x /bin/more ]; then + DEFPAGER=more + elif [ -x /usr/bin/pg ]; then + DEFPAGER=pg + elif [ -x /bin/pg ]; then + DEFPAGER=pg + else + echo "octave-bug: No default pager found: attempting to use more" >&2 + DEFPAGER=more + fi +fi + +: ${PAGER=$DEFPAGER} trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15 trap 'rm -f $TEMP $TEMP.x' 0