~ubuntu-branches/ubuntu/warty/nethack/warty

« back to all changes in this revision

Viewing changes to debian/nethack.sh

  • Committer: Bazaar Package Importer
  • Author(s): Joshua Kwan
  • Date: 2004-04-28 22:20:28 UTC
  • Revision ID: james.westby@ubuntu.com-20040428222028-ir8ahbbxi1jcot2d
Tags: 3.4.3-5
* Add Catalan translation (Closes: #248734)
* Patch work:
  - 91_enh_menucolors: Fix Pasi Kallinen's email address. pk -> pkalli
  - 19_gnome_ext_events (new): Fix a problem in Gnomehack where mouse click
    events in the extended menu would not be handled (thus a certain
    choice might be chosen, but a different one 'picked' by the code).
    (Closes: #246265)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#       SCCS Id: @(#)nethack.sh 3.3     90/02/26
 
3
 
 
4
HACKDIR=/usr/lib/games/nethack
 
5
export HACKDIR
 
6
HACK=$HACKDIR/nethack
 
7
 
 
8
# see if we can find the full path name of PAGER, so help files work properly
 
9
# assume that if someone sets up a special variable (HACKPAGER) for NetHack,
 
10
# it will already be in a form acceptable to NetHack
 
11
# ideas from brian@radio.astro.utoronto.ca
 
12
if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \)
 
13
then
 
14
 
 
15
        HACKPAGER=$PAGER
 
16
 
 
17
#       use only the first word of the pager variable
 
18
#       this prevents problems when looking for file names with trailing
 
19
#       options, but also makes the options unavailable for later use from
 
20
#       NetHack
 
21
        for i in $HACKPAGER
 
22
        do
 
23
                HACKPAGER=$i
 
24
                break
 
25
        done
 
26
 
 
27
        if test ! -f $HACKPAGER
 
28
        then
 
29
                IFS=:
 
30
                for i in $PATH
 
31
                do
 
32
                        if test -f $i/$HACKPAGER
 
33
                        then
 
34
                                HACKPAGER=$i/$HACKPAGER
 
35
                                export HACKPAGER
 
36
                                break
 
37
                        fi
 
38
                done
 
39
                IFS='   '
 
40
        fi
 
41
        if test ! -f $HACKPAGER
 
42
        then
 
43
                echo Cannot find $PAGER -- unsetting PAGER.
 
44
                unset HACKPAGER
 
45
                unset PAGER
 
46
        fi
 
47
fi
 
48
 
 
49
 
 
50
cd $HACKDIR
 
51
exec $HACK "$@"
 
52