[SCM] Quake 3 engine branch, master, updated. 17a6fcabb9ceb603939f9e9483bb3c33b861029f

Simon McVittie smcv at debian.org
Thu Oct 14 23:29:53 UTC 2010


The following commit has been merged in the master branch:
commit 27b74ef81e8e82f11bf6c148e7b935a3554cd352
Author: Simon McVittie <smcv at debian.org>
Date:   Thu Oct 14 23:53:03 2010 +0100

    Enhance the example openarena scripts to support --help, --quiet, and running under a debugger

diff --git a/debian/changelog b/debian/changelog
index 6be133f..a637679 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ ioquake3 (1.36+svn1788j-2) UNRELEASED; urgency=low
     (qplatform.h does support this CPU)
   * Make ioquake3-server recommend openarena-server | quake3-server,
     not their client counterparts
+  * Enhance the example openarena scripts to support --help, --quiet,
+    and running under a debugger
 
  -- Simon McVittie <smcv at debian.org>  Thu, 14 Oct 2010 23:36:27 +0100
 
diff --git a/debian/rules b/debian/rules
index 9b870b5..704b599 100755
--- a/debian/rules
+++ b/debian/rules
@@ -44,10 +44,14 @@ override_dh_auto_build:
 	install build/release-*/ioquake3.* build/ioquake3
 	install build/release-*/ioq3ded.* build/ioq3ded
 	sed -e s/@IOQ3BINARY@/ioquake3/ \
+		-e 's/@IOQ3SELF@/openarena/' \
+		-e 's/@IOQ3ROLE@/client/' \
 		< debian/wrappers/openarena.in \
 		> debian/wrappers/openarena
 	chmod +x debian/wrappers/openarena
 	sed -e s/@IOQ3BINARY@/ioq3ded/ \
+		-e 's/@IOQ3SELF@/openarena-server/' \
+		-e 's/@IOQ3ROLE@/server/' \
 		< debian/wrappers/openarena.in \
 		> debian/wrappers/openarena-server
 	chmod +x debian/wrappers/openarena-server
diff --git a/debian/wrappers/openarena.in b/debian/wrappers/openarena.in
index b7ecb0d..8dc7b78 100644
--- a/debian/wrappers/openarena.in
+++ b/debian/wrappers/openarena.in
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+# quake3 or quake3-server or whatever
+IOQ3SELF=@IOQ3SELF@
+# "server" or "client"
+IOQ3ROLE=@IOQ3ROLE@
 # ioquake3 or ioq3ded
 IOQ3BINARY=@IOQ3BINARY@
 # q3a or openarena
@@ -25,4 +29,36 @@ CVARS="$CVARS +set sv_master1 dpmaster.deathmask.net"
 # update.quake3arena.com is pretty irrelevant if you're playing OA
 CVARS="$CVARS +set cl_motd 0"
 
+QUIET=0
+
+EXCUSE="\
+OpenArena ${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
+
+if test "z$QUIET" = z1; then
+  exec >/dev/null 2>&1;
+fi
+
 exec ${DEBUGGER} ${ENGINE} ${CVARS} "$@"

-- 
Quake 3 engine



More information about the Pkg-games-commits mailing list