~ubuntu-branches/ubuntu/lucid/9base/lucid

« back to all changes in this revision

Viewing changes to rc/rcmain

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2006-01-25 15:33:00 UTC
  • Revision ID: james.westby@ubuntu.com-20060125153300-6hh4p9wx8iqqply5
Tags: upstream-2
ImportĀ upstreamĀ versionĀ 2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# rcmain: Plan 9 on Unix version
 
2
if(~ $#home 0) home=$HOME
 
3
if(~ $#home 0) home=/
 
4
if(~ $#ifs 0) ifs='     
 
5
'
 
6
switch($#prompt){
 
7
case 0
 
8
        prompt=('; ' '  ')
 
9
case 1
 
10
        prompt=($prompt '       ')
 
11
}
 
12
if(~ $rcname ?.out ?.rc */?.rc */?.out) prompt=('broken! ' '    ')
 
13
if(flag p) path=(/bin /usr/bin)
 
14
if not{
 
15
        finit
 
16
        # should be taken care of by rc now, but leave just in case
 
17
}
 
18
fn sigexit
 
19
if(! ~ $#cflag 0){
 
20
        if(flag l && test -r $home/lib/profile) . $home/lib/profile
 
21
        status=''
 
22
        eval $cflag
 
23
        exit $status
 
24
}
 
25
if(flag i){
 
26
        if(flag l && test -r $home/lib/profile) . $home/lib/profile
 
27
        status=''
 
28
        if(! ~ $#* 0) . $*
 
29
        . -i '/dev/stdin'
 
30
        exit $status
 
31
}
 
32
if(flag l && test -r $home/lib/profile) . $home/lib/profile
 
33
if(~ $#* 0){
 
34
        . /dev/stdin
 
35
        exit $status
 
36
}
 
37
status=''
 
38
. $*
 
39
exit $status