~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/pager

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Description: Perfer pager over more.
 
2
 GRASS 6 used a shell script to set the GRASS_PAGER environment variable.
 
3
 GRASS 7 reimplemented the shell script in Python.
 
4
 .
 
5
 The original version of this patch was made by Francesco Paolo Lovergine, and
 
6
 ported to Python by Bas Couwenberg.
2
7
Author: Francesco Paolo Lovergine <frankie@debian.org>
 
8
Author: Bas Couwenberg <sebastic@xs4all.nl>
3
9
 
4
 
--- a/lib/init/init.sh
5
 
+++ b/lib/init/init.sh
6
 
@@ -301,10 +301,12 @@ export GRASS_LD_LIBRARY_PATH
7
 
 
8
 
 # Set some environment variables if they are not set
9
 
 if [ ! "$GRASS_PAGER" ] ; then
10
 
-    if [ -x /bin/more ] || [ -x /usr/bin/more ] ; then
11
 
-        GRASS_PAGER=more
12
 
+    if [ -x /usr/bin/pager ] ; then
13
 
+       GRASS_PAGER=pager
14
 
     elif [ -x /bin/less ] || [ -x /usr/bin/less ] ; then
15
 
         GRASS_PAGER=less
16
 
+    elif [ -x /bin/more ] || [ -x /usr/bin/more ] ; then
17
 
+         GRASS_PAGER=more
18
 
     elif [ "$MINGW" ] ; then
19
 
         GRASS_PAGER=more
20
 
     else
 
10
--- a/lib/init/grass.py
 
11
+++ b/lib/init/grass.py
 
12
@@ -435,10 +435,12 @@ def find_exe(pgm):
 
13
 def set_defaults():
 
14
     # GRASS_PAGER
 
15
     if not os.getenv('GRASS_PAGER'):
 
16
-        if find_exe("more"):
 
17
-            pager = "more"
 
18
+        if find_exe("pager"):
 
19
+            pager = "pager"
 
20
         elif find_exe("less"):
 
21
             pager = "less"
 
22
+        elif find_exe("more"):
 
23
+            pager = "more"
 
24
         elif windows:
 
25
             pager = "more"
 
26
         else: