From 9d9ad9a876d6498a89f9aeefc9bf258e1674dae7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Mar 2012 14:23:00 -0400 Subject: Tighten Linux treatment of command-line args to 'secondlife' script. New --leap switch takes a quoted command line likely to contain spaces. Sloppy handling of quoted arguments definitely gets us into trouble. Fix that. --- indra/newview/linux_tools/wrapper.sh | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index 283a28a0aa..90771f1174 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -110,22 +110,22 @@ export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" # fi #fi -export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"${LD_LIBRARY_PATH}"' -export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-secondlife-bin' -export SL_OPT="`cat etc/gridargs.dat` $@" +export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}" -# Run the program -eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || LL_RUN_ERR=runerr +# Run the program. +# Don't quote $LL_WRAPPER because, if empty, it should simply vanish from the +# command line. Similar remarks about the contents of gridargs.dat. But DO +# quote "$@": preserve separate args as individually quoted. +$LL_WRAPPER bin/do-not-directly-run-secondlife-bin $(