plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

9term (560B)


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