Bug#411350: sh syntax errors in openarena wrapper script

Damián Viano debian at damianv.com.ar
Sun Feb 18 12:32:15 CET 2007


Package: openarena
Version: 0.6.0-2
Severity: normal
Tags: patch

I notice some errors while running openarena, probably due to having
setup dash as /bin/sh. Nonetheless as /bin/sh is in the shell bang it
I'm attaching a patch to fix the bashisms.

This is the wrapper script to basically don't do anything it is supposed
to do i.e. it always start the game the same way and parameters parsing
isn't performed at all:

des at katie:~$ openarena
[: 30: ==: unexpected operator
ioQ3 1.33+oa linux-i386 Jan 27 2007
----- FS_Startup -----
Current search path:
...

des at katie:~$ openarena -q
[: 23: ==: unexpected operator
[: 23: ==: unexpected operator
[: 30: ==: unexpected operator
ioQ3 1.33+oa linux-i386 Jan 27 2007
----- FS_Startup -----
Current search path:
...

Hope to help,

	Damián Viano(Des).

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages openarena depends on:
ii  libc6                       2.3.6.ds1-11 GNU C Library: Shared libraries
ii  libcurl3                    7.15.5-1     Multi-protocol file transfer libra
ii  libopenal0a                 1:0.0.8-4    OpenAL is a portable library for 3
ii  libsdl1.2debian             1.2.11-8     Simple DirectMedia Layer
ii  openarena-data              0.6.0-1      OpenArena game data
-------------- next part --------------
--- openarena.orig	2007-02-18 08:18:11.000000000 -0300
+++ openarena	2007-02-18 08:18:32.000000000 -0300
@@ -14,7 +14,7 @@
 # Quake 3 binaries don't understand "regular" command line parameters. Let's
 # catch them here, to avoid accidently launching the binary.
 while [ "$1" != "" ]; do {
-	if [ "$1" == "+set" ] || [ "$1" == "+exec" ]; then
+	if [ "$1" = "+set" ] || [ "$1" = "+exec" ]; then
 		break;
 	fi
 	case "$1" in
@@ -30,7 +30,7 @@
 }; done
 
 # Ready to rumble!
-if [ ${QUIET} == 1 ]; then
+if [ ${QUIET} -eq 1 ]; then
 	exec /usr/lib/games/openarena/openarena.bin +set fs_basepath /usr/share/games/openarena +set ttycon 0 "$@" >/dev/null 2>&1
 else
 	exec /usr/lib/games/openarena/openarena.bin +set fs_basepath /usr/share/games/openarena "$@"


More information about the Pkg-games-devel mailing list