File: wolfded

package info (click to toggle)
iortcw 1.51.c%2Bdfsg1-8
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 25,308 kB
  • sloc: ansic: 457,326; cpp: 6,507; makefile: 4,740; sh: 1,292; asm: 1,176; xml: 31
file content (68 lines) | stat: -rwxr-xr-x 1,579 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh

if [ -x /usr/share/games/game-data-packager-runtime/gdp_launcher_base.py ]; then
  exec /usr/share/games/game-data-packager-runtime/gdp_launcher_base.py --id=wolfded "$@"
fi

IOQ3SELF="wolfded"
IOQ3ROLE="multiplayer server"
IOQ3BINARY="iowolfded"

BASEPATH="/usr/lib/rtcw"
ENGINE="$BASEPATH/${IOQ3BINARY}"

QUIET=0

# iortcw official releases use ~/.wolf but prereleases use ~/.iortcw.
# Align the two for Debian.
CVARS="+set com_homepath .wolf"

EXCUSE="\
Return to Castle Wolfenstein ${IOQ3ROLE} wrapper for Debian\n\
\n\
Usage: ${IOQ3SELF} [OPTION]...\n\
\n\
 -h, --help\t\tDisplay this help\n\
 -q, --quiet\t\tDisable console output\n\
  +<internal command>\tPass commands to the engine\n"

while [ "$1" != "" ]; do
  case "$1" in
    -h|--help)
      echo ${EXCUSE}
      exit 0
      ;;
    -q|--quiet)
      CVARS="$CVARS +set ttycon 0"
      QUIET=1
      ;;
    *)
      break
      ;;
  esac
  shift
done

# sanity check: the engine doesn't cope well with missing data
for i in pak0 sp_pak4 sp_rend2_shaders0 mp_pak5; do
  if test -f $BASEPATH/main/$i.pk3; then
    :
  else
    echo "Return to Castle Wolfenstein data missing, see ${BASEPATH}/README.rtcw-data"
    exit 72     # EX_OSFILE
  fi
done

if test "z$QUIET" = z1; then
  exec >/dev/null 2>&1;
fi

# So that switching SP <-> MP will work
cd $BASEPATH

if test -n "$RTCW_BACKTRACE"; then
  exec gdb -return-child-result -batch -ex run -ex 'thread apply all bt full' -ex kill -ex quit --args ${ENGINE} ${CVARS} "$@"
else
  exec ${RTCW_DEBUGGER} ${ENGINE} ${CVARS} "$@"
fi
# vim:set sw=2 sts=2 ft=sh: