diff options
author | Oz Linden <oz@lindenlab.com> | 2013-08-26 15:14:12 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-08-26 15:14:12 -0400 |
commit | 7ca10e516126e5fa9b076c04957b491495513907 (patch) | |
tree | 690323c7379c8151b1d7e251fa2878c10603fd61 /indra/newview/linux_tools/wrapper.sh | |
parent | 1e2a6ee3f440b7d076dc97f3a0628c90195f5386 (diff) | |
parent | 6e1138585bf745f73f0bb99ca62f77eeb273f1e4 (diff) |
merge changes for 3.6.4-release
Diffstat (limited to 'indra/newview/linux_tools/wrapper.sh')
-rwxr-xr-x | indra/newview/linux_tools/wrapper.sh | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index d8440eebf1..c23401d5a6 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -121,37 +121,21 @@ export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}" -# Have to deal specially with gridargs.dat; typical contents look like: -# --channel "Second Life Test" --settings settings_test.xml -# Simply embedding $(<etc/gridargs.dat) into a command line treats each of -# Second, Life and Developer as separate args -- no good. We need bash to -# process quotes using eval. -# First, check if we have been instructed to skip reading in gridargs.dat: -skip_gridargs=false -argnum=0 +# Copy "$@" to ARGS array specifically to delete the --skip-gridargs switch. +# The gridargs.dat file is no more, but we still want to avoid breaking +# scripts that invoke this one with --skip-gridargs. +ARGS=() for ARG in "$@"; do - if [ "--skip-gridargs" == "$ARG" ]; then - skip_gridargs=true - else - ARGS[$argnum]="$ARG" - argnum=$(($argnum+1)) + if [ "--skip-gridargs" != "$ARG" ]; then + ARGS[${#ARGS[*]}]="$ARG" fi done -# Second, read it without scanning, then scan that string. Break quoted words -# into a bash array. Note that if gridargs.dat is empty, or contains only -# whitespace, the resulting gridargs array will be empty -- zero entries -- -# therefore "${gridargs[@]}" entirely vanishes from the command line below, -# just as we want. -if ! $skip_gridargs ; then - eval gridargs=("$(<etc/gridargs.dat)") -fi - # Run the program. # Don't quote $LL_WRAPPER because, if empty, it should simply vanish from the -# command line. But DO quote "$@": preserve separate args as individually -# quoted. Similar remarks about the contents of gridargs. -$LL_WRAPPER bin/do-not-directly-run-secondlife-bin "${gridargs[@]}" "${ARGS[@]}" +# command line. But DO quote "${ARGS[@]}": preserve separate args as +# individually quoted. +$LL_WRAPPER bin/do-not-directly-run-secondlife-bin "${ARGS[@]}" LL_RUN_ERR=$? # Handle any resulting errors |