# HG changeset patch # User jwe # Date 1111437464 0 # Node ID 9b0ff1aefcbe55b6b2115a7d1747015fd55bcf70 # Parent 189fe4f85c77277f0096b476fc02a5afc41e558a [project @ 2005-03-21 20:37:44 by jwe] diff -r 189fe4f85c77 -r 9b0ff1aefcbe ChangeLog --- a/ChangeLog Mon Mar 21 20:25:39 2005 +0000 +++ b/ChangeLog Mon Mar 21 20:37:44 2005 +0000 @@ -1,3 +1,8 @@ +2005-03-21 John W. Eaton + + * 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 * configure.in: Move check for -lumfpack to after check for blas. diff -r 189fe4f85c77 -r 9b0ff1aefcbe octave-bug.in --- a/octave-bug.in Mon Mar 21 20:25:39 2005 +0000 +++ b/octave-bug.in Mon Mar 21 20:37:44 2005 +0000 @@ -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