home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Quit•cps next >
Encoding:
Text File  |  1993-12-14  |  1.1 KB  |  61 lines  |  [TEXT/MPS ]

  1. if !"{cps_inited}"
  2.     if "{IsShuttingDown}"
  3.         Alert "quit•cps is missing basic definitions, aborting"
  4.         exit 1
  5.     end
  6.     exit
  7. end
  8.  
  9. set exit 0
  10.  
  11. If "``rshell -status``"
  12.     set exit 0
  13.     confirm "You have RShell requests that have not yet completed.  Really Quit?" -t 
  14.     If {status} != 0 
  15.         exit "-9"
  16.     End
  17. End
  18. if !"{IsShuttingDown}" || !"{HasRamDisk}" # bruges til at fjerne RamMPW
  19.     set exit 0
  20.     SendAE -t ToolServer -e aevtquit ∑∑ dev:null
  21.     set exit 1
  22. else
  23.     SendAE -t ToolServer -e abcdefgh ∑∑ dev:null && RShell -b Flush # only if running
  24. end
  25.  
  26. begin
  27.     echo "begin"
  28.     echo "set exit 0";
  29.     windows -o
  30.     echo "close {mpw}Worksheet ∑∑ dev:null"
  31.     echo -n "directory "
  32.     directory
  33.     echo "end ∑∑ dev:null"
  34. end > {mpw}Userstartup•Windows
  35.  
  36. save_all -objs
  37. close -a -y
  38.  
  39. cd {mpw}
  40.  
  41. if "{TmpDir}"
  42.     if "{HasRamDisk}"
  43.         echo -n > {tmp} # avoid "No match for file name pattern" error from MPW_Shell
  44.         rm {tmp}[0-9]* # {tmp} {tmp2} {tmp3} ...
  45.     else
  46.         rm -y {TmpDir}
  47.     end
  48. end
  49.  
  50. if "{IsShuttingDown}"
  51.     if "{HasRamDisk}"
  52.         rm -y -i {TmpDir}
  53.         if !"{IsMiniEnviroment}"
  54.             rm -y -i {RamKilde}
  55.             RShell -b {TSF}RamRemoveMPW
  56.             exit
  57.         end
  58.     end
  59.     {mpw}Tools:SendAE -e FNDRshut -t Finder -m 1
  60. end
  61.