summaryrefslogtreecommitdiff
path: root/hw/xquartz/bundle/X11.sh
blob: 3b8b6799c9dc23eff883429872545d38f7a54213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

set "$(dirname "$0")"/X11.bin "${@}"

if [ -x ~/.x11run ]; then
	exec ~/.x11run "${@}"
fi

case $(basename "${SHELL}") in
	bash)          exec -l "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;;
	ksh|sh|zsh)    exec -l "${SHELL}" -c 'exec "${@}"' - "${@}" ;;
	csh|tcsh)      exec -l "${SHELL}" -c 'exec $argv:q' "${@}" ;;
	es|rc)         exec -l "${SHELL}" -l -c 'exec $*' "${@}" ;;
	*)             exec    "${@}" ;;
esac