summaryrefslogtreecommitdiff
path: root/utils/rcsh/rcmain
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 21:39:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 21:39:35 +0000
commit74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (patch)
treec6e220ba61db3a6ea4052e6841296d829654e664 /utils/rcsh/rcmain
parent46439007cf417cbd9ac8049bb4122c890097a0fa (diff)
20060303
Diffstat (limited to 'utils/rcsh/rcmain')
-rw-r--r--utils/rcsh/rcmain29
1 files changed, 29 insertions, 0 deletions
diff --git a/utils/rcsh/rcmain b/utils/rcsh/rcmain
new file mode 100644
index 00000000..f74190ca
--- /dev/null
+++ b/utils/rcsh/rcmain
@@ -0,0 +1,29 @@
+# rcmain: 9pm version
+if(~ $#home 0) home=/
+if(~ $#ifs 0) ifs='
+'
+switch($#prompt){
+case 0
+case 1
+ prompt=('% ' ' ')
+}
+if(~ $rcname v.out) prompt=('broken! ' ' ')
+if(! ~ $#cflag 0){
+ if(flag l && test -r $home/lib/profile) . $home/lib/profile
+ status=''
+ eval $cflag
+}
+if not if(flag i){
+ if(flag l && test -r $home/lib/profile) . $home/lib/profile
+ status=''
+ if(! ~ $#* 0) . $*
+ if not . -i 'stdin$'
+}
+if not {
+ if(~ $#* 0) . 'stdin$'
+ if not{
+ status=''
+ . $*
+ }
+}
+exit $status