logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

rcmain (598B)


  1. # rcmain: unix version
  2. if(~ $#home 0) home=$HOME
  3. if(~ $#ifs 0) ifs='
  4. '
  5. profile=$home/.rcrc
  6. switch($#prompt){
  7. case 0
  8. prompt=('% ' ' ')
  9. case 1
  10. prompt=($prompt ' ')
  11. }
  12. if(~ $rcname ?.out) prompt=('broken! ' ' ')
  13. if(flag p) path=/bin
  14. if not {
  15. finit
  16. if(~ $#path 0) path=(. /bin /usr/bin /usr/local/bin)
  17. }
  18. fn sigexit
  19. if(! ~ $#cflag 0){
  20. if(flag l && test -r $profile) . $profile
  21. status=''
  22. eval $cflag
  23. }
  24. if not if(flag i){
  25. if(flag l && test -r $profile) . $profile
  26. status=''
  27. if(! ~ $#* 0) . $*
  28. . -i /proc/self/fd/0
  29. }
  30. if not if(~ $#* 0) . /proc/self/fd/0
  31. if not{
  32. status=''
  33. . $*
  34. }
  35. exit $status