[Xquartz-dev] 2.3.2_rc4
Harald Hanche-Olsen
hanche at math.ntnu.no
Sun Dec 21 14:59:28 PST 2008
+ Martin Costabel <costabel at wanadoo.fr>:
> #!/bin/bash --login
> export cmd=$(dirname "$0")/X11.bin
> export args="${@}"
> exec -l "$SHELL" -c 'exec "$cmd" "$args"'
Or, as I indicated earlier, we could actually investigate $SHELL and
do the appropriate thing depending on the value.
Here is my take (NB untested):
#!/bin/bash --login
if [ -x ~/.x11-run ]; then exec ~/.x11-run "$@"; fi
case "$SHELL" in
*/bash)
exec "$@" ;;
*/ksh | */sh | */zsh)
exec -l "$SHELL" -c 'exec "$@"' - "$@" ;;
*/csh | */tcsh)
exec -l "$SHELL" -c 'exec $argv:q' "$@" ;;
*/es | */rc)
exec "$SHELL" -l -c 'exec $*' "$@" ;;
*)
exec "$@" ;;
esac
- Harald
More information about the Xquartz-dev
mailing list