aboutsummaryrefslogtreecommitdiff
path: root/mac/9term.app/Contents/MacOS/9term
blob: 17a0615dbe7e02b1c0f9f0baf4e81f88cd2a08bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
fshell=$(finger $(whoami) | sed -n 's/.*Shell: //p' | sed 1q)
SHELL=${fshell:-$SHELL}
PLAN9=${PLAN9:-/Users/ethan/plan9port}
cd $HOME
arch=x86_64
if arch -arch arm64 date >/dev/null 2>&1; then
	arch=arm64
fi
case "$SHELL" in
*/rc)
	echo '
		if(! ~ $PLAN9/bin $path)
			path=($path $PLAN9/bin)
		arch -arch '$arch' $PLAN9/bin/9term -l -W600x800 &
	' | $SHELL -l
	exit 0
	;;
*/bash)
	. ~/.bash_profile
	;;
*)
	. ~/.profile
	;;
esac

if ! [[ :$PATH: =~ :$PLAN9/bin: ]]
then
	PATH=$PATH:$PLAN9/bin
fi
arch -arch $arch $PLAN9/bin/9term -l -W600x800 &
exit 0