xref: /plan9/rc/bin/ape/psh (revision 2a7824990d644563b93ed8d4abf1407c40b2087a)
1#!/bin/rc
2# set up a shell running in an approximate POSIX 1003.2 environment
3rfork en
4fn sigterm{}
5HOME=$home
6bind -b /rc/bin/ape /bin
7bind -b /$cputype/bin/ape /bin
8if(test -d /$cputype/bin/pub)
9	bind -a /$cputype/bin/pub /bin
10if(test -d /$cputype/bin/X11){
11	bind -a /$cputype/bin/X11 /bin
12	if(test ! -e /env/DISPLAY)
13		DISPLAY=:0.0
14}
15
16/bin/sh $*
17