home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 33 VDrivers / 33-VDrivers.zip / cirrusn1.zip / SETUP.CMD < prev    next >
OS/2 REXX Batch file  |  1996-02-15  |  2KB  |  77 lines

  1. @if not exist echo.on ECHO OFF
  2. IF .%1. == .. GOTO USAGE
  3. IF .%2. == .. GOTO USAGE
  4. set src=%1
  5. set trg=%2
  6. set log=%trg%\os2\install\display.log
  7. set ver=3.01,3.0,2.11,2.1
  8. %src%\prep_log %log%
  9. IF ERRORLEVEL 3 GOTO LOG_PROBLEM
  10. IF EXIST %src%\BUILD.LVL type %src%\BUILD.LVL >> %log%
  11. IF NOT EXIST %trg%\OS2\INSTALL set missing=%trg%\os2\install&& GOTO MISSING
  12. IF NOT EXIST %src%\INSCFG32.DL_ set missing=%src%\inscfg32.dl_&& GOTO MISSING
  13. IF NOT EXIST %src%\testver.exe set missing=%src%\testver.exe&& goto missing
  14. %src%\testver >> %log%
  15. IF ERRORLEVEL 302 GOTO VER_NOT_OK
  16. IF ERRORLEVEL 300 set dsc=%src%\v3.dsc&& GOTO VER_OK
  17. IF ERRORLEVEL 212 GOTO VER_NOT_OK
  18. IF ERRORLEVEL 211 set dsc=%src%\pre_v3.dsc&& set cfg=%src%\vcfginst.exe&& GOTO VER_OK
  19. IF ERRORLEVEL 210 set dsc=%src%\pre_v3.dsc&& set cfg=%src%\vcfginst.exe&& GOTO VER_OK
  20. GOTO VER_NOT_OK
  21. :VER_OK
  22. if not exist %dsc% set missing=%dsc%&& GOTO MISSING
  23. set apath=%path%
  24. set  path=%src%;%path%
  25. IF EXIST %src%\wdc24.dsp if not exist %trg%\ibmvesa MD %trg%\ibmvesa
  26. set fil=%src%\dspinstl.ex_
  27. unpack %fil% %trg% >> %log%
  28. IF ERRORLEVEL 1 GOTO UNPACK_ERR
  29. set fil=%src%\inscfg32.dl_
  30. unpack %fil% %trg% >> %log%
  31. IF ERRORLEVEL 1 GOTO UNPACK_ERR
  32. if .%3. == .. set cid=&& goto skipcid
  33. set cid=/u
  34. :skipcid
  35. %trg%\os2\install\dspinstl.exe /pk:other /sk:none /s:%src% /t:%trg%\ /pd:%dsc% /l:%log% %cid%
  36. if .%cfg%. == .. goto skipcfg
  37. if exist %cfg% %cfg%
  38. :skipcfg
  39. %src%\product.exe %src% %trg% %cid%
  40. set  path=%apath%
  41. GOTO END
  42. :VER_NOT_OK
  43. @ECHO.
  44. @ECHO This fixpack is intended for OS/2 versions %ver% only !
  45. @ECHO This fixpack is intended for OS/2 versions %ver% only ! >> %log%
  46. @ECHO.
  47. goto end
  48. :LOG_PROBLEM
  49. @ECHO.
  50. @ECHO Error setting attributes on %log%
  51. @ECHO.
  52. goto end
  53. :UNPACK_ERR
  54. @ECHO.
  55. @ECHO Error unpacking %fil%
  56. @ECHO Error unpacking %fil% >> %log%
  57. @ECHO.
  58. goto end
  59. :MISSING
  60. @ECHO.
  61. @ECHO Cannot locate %missing%
  62. @ECHO Cannot locate %missing% >> %log%
  63. @ECHO.
  64. rem fall thru intended
  65. :USAGE
  66. ECHO.
  67. ECHO Usage: %0 [SOURCE_PATH:] [BOOTDRIVE:] {[CID]}
  68. ECHO.
  69. ECHO Use the optional CID parameter for CID installs
  70. :LOGUSAGE
  71. IF .%trg%. == .. GOTO END
  72. ECHO. >> %log%
  73. ECHO Usage: %0 [SOURCE_PATH:] [BOOTDRIVE:] {[CID]} >> %log%
  74. ECHO. >> %log%
  75. ECHO Use the optional CID parameter for CID installs >> %log%
  76. :END
  77.