[ioquake3] 46/50: Escape quotes for sv_dlURL in shell so it doesn't become "http:"
Simon McVittie
smcv at debian.org
Sun Jul 23 21:55:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit 67dace6c209c91fac5861846364e62c1c67aab77
Author: Zack Middleton <zack at cloemail.com>
Date: Thu Jul 20 22:37:36 2017 -0500
Escape quotes for sv_dlURL in shell so it doesn't become "http:"
q3ded +set sv_dlURL "http://example.org"
The shell removes the quotes but makes the content be a single argument
for progam args. Quake 3 concatenates all the program args and splits
lines at + or newlines. Then Quake 3 parses them using a tokenizer
that skips unquoted C comments beginning with //. This results in
the cvar being set to "http:".
Escape the quotes so they are passed to the program and the tokenizer
knows not to skip C comments.
q3ded +set sv_dlURL \"http://example.org\"
---
misc/linux/start_server.sh | 8 ++++++--
misc/osx/start_server.sh | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/misc/linux/start_server.sh b/misc/linux/start_server.sh
index da98007..c68292e 100644
--- a/misc/linux/start_server.sh
+++ b/misc/linux/start_server.sh
@@ -1,3 +1,7 @@
#!/bin/sh
-echo "Edit this script to change the path to ioquake3's dedicated server executable and which binary if you aren't on x86_64.\n Set the sv_dlURL setting to a url like http://yoursite.com/ioquake3_path for ioquake3 clients to download extra data"
-~/ioquake3/ioq3ded.x86_64 +set dedicated 2 +set sv_allowDownload 1 +set sv_dlURL "" +set com_hunkmegs 64 "$@"
+echo "Edit this script to change the path to ioquake3's dedicated server executable and which binary if you aren't on x86_64."
+echo "Set the sv_dlURL setting to a url like http://yoursite.com/ioquake3_path for ioquake3 clients to download extra data."
+
+# sv_dlURL needs to have quotes escaped like \"http://yoursite.com/ioquake3_path\" or it will be set to "http:" in-game.
+
+~/ioquake3/ioq3ded.x86_64 +set dedicated 2 +set sv_allowDownload 1 +set sv_dlURL \"\" +set com_hunkmegs 64 "$@"
diff --git a/misc/osx/start_server.sh b/misc/osx/start_server.sh
index 66a295f..d9154b2 100644
--- a/misc/osx/start_server.sh
+++ b/misc/osx/start_server.sh
@@ -1,3 +1,7 @@
#!/bin/sh
-echo "Edit this script to change the path to ioquake3's dedicated server executable.\n Set the sv_dlURL setting to a url like http://yoursite.com/ioquake3_path for ioquake3 clients to download extra data"
-/Applications/ioquake3/ioquake3.app/Contents/MacOS/ioq3ded +set dedicated 2 +set sv_allowDownload 1 +set sv_dlURL "" +set com_hunkmegs 64 "$@"
+echo "Edit this script to change the path to ioquake3's dedicated server executable."
+echo "Set the sv_dlURL setting to a url like http://yoursite.com/ioquake3_path for ioquake3 clients to download extra data."
+
+# sv_dlURL needs to have quotes escaped like \"http://yoursite.com/ioquake3_path\" or it will be set to "http:" in-game.
+
+/Applications/ioquake3/ioquake3.app/Contents/MacOS/ioq3ded +set dedicated 2 +set sv_allowDownload 1 +set sv_dlURL \"\" +set com_hunkmegs 64 "$@"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list