~ubuntu-branches/ubuntu/lucid/debianutils/lucid

« back to all changes in this revision

Viewing changes to sensible-pager

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2009-11-14 13:16:01 UTC
  • mfrom: (1.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20091114131601-24a06erceh63t4sx
Tags: 3.2.2
* savelog: patch from Patrick Coleman to fix breakage when target file
  does not exist.  closes: #556227.
* Bump to Standards-Version 3.8.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
${PAGER:-pager} "$@"
4
 
ret="$?"
5
 
if [ "$ret" -eq 126 ] || [ "$ret" -eq 127 ]; then
6
 
more "$@"
7
 
ret="$?"
8
 
        if [ "$ret" -eq 126 ] || [ "$ret" -eq 127 ]; then
9
 
                echo "Couldn't find a pager!" 1>&2
10
 
                echo "Set the \$PAGER environment variable to your desired pager." 1>&2
11
 
                exit 1
12
 
        fi
13
 
fi