Debian Codegraph @

debian/sky

raw symbols SCIP
1 #!/bin/sh -e
2
3 GAMELANG=
4 ENVLANG=
5 domain=sky
6
7 if [ $(which gettext) ]; then
8 gettext="gettext --domain=$domain -s --"
9 else
10 gettext=echo
11 fi
12
13 usage()
14 {
15 $gettext "Usage: sky [OPTION]"
16 $gettext "Start Beneath a Steel Sky"
17 echo
18 $gettext "--en play the English version"
19 $gettext "--de play the German version"
20 $gettext "--fr play the French version"
21 $gettext "--it play the Italian version"
22 $gettext "--es play the Spanish version"
23 $gettext "--help display this help and exit"
24 $gettext "--version display version information and exit"
25 }
26
27 version()
28 {
29 $gettext "Beneath a Steel Sky v0.0372"
30 $gettext "Copyright (C) Revolution Software Ltd."
31 $gettext "ScummVM engine Copyright (C) The ScummVM Team"
32 }
33
34 ENVLANG=$(
35 echo $LANGUAGE $LANG en | tr ': ' '\n' | cut -c1-2 | while read lang;
36 do
37 echo $lang | grep -E "de|fr|it|es|en" && break
38 done
39 )
40
41 if ! [ x"$ENVLANG" = x"en" ]; then
42 GAMELANG="-n -q $ENVLANG"
43 fi
44
45 if [ "$#" -gt "1" ]; then
46 usage
47 exit 1
48 elif [ "$#" -eq "1" ]; then
49 case "$1" in
50 --en)
51 ;;
52 --de)
53 GAMELANG="-q de"
54 ;;
55 --fr)
56 GAMELANG="-q fr"
57 ;;
58 --it)
59 GAMELANG="-q it"
60 ;;
61 --es)
62 GAMELANG="-q es"
63 ;;
64 --help)
65 usage
66 exit 0
67 ;;
68 --version)
69 version
70 exit 0
71 ;;
72 *)
73 usage
74 exit 1
75 ;;
76 esac
77 fi
78
79 /usr/games/scummvm $GAMELANG -p /usr/share/scummvm/beneath-a-steel-sky sky
80
81 exit 0