[Xquartz-dev] 2.3.2_rc4
Harald Hanche-Olsen
hanche at math.ntnu.no
Sat Dec 27 00:43:31 PST 2008
+ Cameron Simpson <cs at zip.com.au>:
> #!/bin/bash -ue
> [...]
> haveenv=
>
> usage="Usage: $cmd {--have-login-env | command [args...]|"
>
> if [ $# -gt 0 ] && [ "x$1" = x--have-login-env ]
> then
> haveenv=1
> shift
> fi
> [...]
> if [ $haveenv ]
> then
> eval "set -- $_WITH_LOGIN_ENV_QUOTED_COMMAND"
> unset _WITH_LOGIN_ENV_QUOTED_COMMAND
> exec "$@"
> fi
Would it make sense to drop the --have-login-env command line flag and
just test for the presence of _WITH_LOGIN_ENV_QUOTED_COMMAND in the
environment instead? I think we can ignore the possibility of an empty
value, so a test like if [ -n "${_WITH_LOGIN_ENV_QUOTED_COMMAND:-}" ]
replacing if [ $haveenv ] would do. Suggested patch attached.
- Harald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: with-login-env.diff
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/xquartz-dev/attachments/20081227/190bdb39/attachment.bin>
More information about the Xquartz-dev
mailing list