home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / insp110p.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1993-04-23  |  2KB  |  91 lines

  1. @echo off
  2. rem ...
  3. rem ... InspectA installation batch file
  4. rem ...
  5. rem Protected mode version
  6.  
  7. SETLOCAL
  8.  
  9. set P=P
  10. set S=REM
  11. set D=REM
  12. set O=OS2
  13.  
  14.     if '%O%' == '' goto noEnv
  15.  
  16.     if '%1' == '-H' goto getHelp
  17.     if '%1' == '-h' goto getHelp
  18.     if '%1' == '/H' goto getHelp
  19.     if '%1' == '/h' goto getHelp
  20.  
  21.     if '%1' == '-D' set D=
  22.     if '%1' == '-d' set D=
  23.     if '%1' == '/D' set D=
  24.     if '%1' == '/d' set D=
  25.     if '%1' == '-S' set S=
  26.     if '%1' == '-s' set S=
  27.     if '%1' == '/S' set S=
  28.     if '%1' == '/s' set S=
  29.  
  30.     if not exist inspect%P%.exe goto noInspectA
  31.     if not exist iconfig%P%.exe goto noInspectA
  32.     if not exist config.%O%     goto noConfigs
  33. %D% if not exist mailer.Dyn     goto noConfigs
  34. %S% if not exist mailer.Sta     goto noConfigs
  35.  
  36.     iConfig%P% -c . -i config.%O%
  37. %D% iConfig%P% -c . -i mailer.Dyn
  38. %S% iConfig%P% -c . -i mailer.Sta
  39.  
  40.     echo.
  41.     echo. Use InspectA to copy/move these to a convenient location!
  42.     echo.
  43.  
  44.     inspect%P% -c .
  45.  
  46.     goto endAll
  47.  
  48. :noEnv
  49.     echo.
  50.     echo. There is insufficient environment space available for %0
  51.     echo. Either increase your global environment space, or quit all
  52.     echo. applications and run %0 from the first shell.
  53.     goto endError
  54.  
  55. :noInspectA
  56.     echo.
  57.     echo. This installation batch file must be run on your hard drive
  58.     echo. in the same directory as Inspect%P%.exe and IConfig%P%.exe
  59.     goto endError
  60.  
  61. :noConfigs
  62.     echo.
  63.     echo. This installation batch file requires a template config file(s):
  64.     echo.    - config.%O%
  65. %D% echo.    - mailer.dyn
  66. %S% echo.    - mailer.sta
  67.     goto endError
  68.  
  69. :endError
  70.     rem ... beep for good measure
  71.     echo. 
  72.     echo. %0 aborted.
  73. :getHelp
  74.     echo.
  75.     echo. %0: usage:
  76.     echo.
  77.     echo.        %0 [-S] [-D] [-H]
  78.     echo.
  79.     echo.  Installs standard InspectA DOS or OS/2 configuration.
  80.     echo.
  81.     echo.  -H  issues this help message
  82.     echo.  -S  includes a template config for STATIC (Opus/BT) systems
  83.     echo.  -D  includes a template config for DYNAMIC (FD/InterMail/SEAdog) systems
  84.     echo.
  85.     pause
  86.     goto endAll
  87.  
  88. :endAll
  89. ENDLOCAL
  90.  
  91.