aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/bundle/X11.sh
blob: 48c0553d1c636527acdaa6dc68865f218b02d13a (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