home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 33 VDrivers / 33-VDrivers.zip / ct6554vl.zip / SETUP.CMD < prev    next >
OS/2 REXX Batch file  |  1996-08-23  |  3KB  |  84 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. IF NOT EXIST %src%\chips*.dsc set missing=%src%\chips*.dsc GOTO MISSING
  15. IF EXIST %trg%\os2\install\CT*.DSC del %trg%\os2\install\CT*.DSC >NUL
  16. %src%\testver >> %log%
  17. IF ERRORLEVEL 302 GOTO VER_NOT_OK
  18. IF ERRORLEVEL 300 set dsc=%src%\prereqs.dsc&& GOTO VER_WARP
  19. IF ERRORLEVEL 212 GOTO VER_NOT_OK
  20. IF ERRORLEVEL 211 set dsc=%src%\prereqs.dsc&& set cfg=%src%\vcfginst.exe&& GOTO VER_WARP
  21. IF ERRORLEVEL 210 set dsc=%src%\prereqs.dsc&& set cfg=%src%\vcfginst.exe&& GOTO VER_WARP
  22. IF ERRORLEVEL 400 set dsc=%src%\prereqs.dsc&& GOTO VER_MERLIN
  23. GOTO VER_NOT_OK
  24. :VER_MERLIN
  25. copy %src%\chipm*.dsc %trg%\os2\install\chips*.dsc >NUL
  26. GOTO VER_OK
  27. :VER_WARP
  28. copy %src%\chips*.dsc %trg%\os2\install >NUL
  29. :VER_OK
  30. if not exist %dsc% set missing=%dsc%&& GOTO MISSING
  31. set apath=%path%
  32. set  path=%src%;%path%
  33. set fil=%src%\dspinstl.ex_
  34. unpack %fil% %trg% >> %log%
  35. IF ERRORLEVEL 1 GOTO UNPACK_ERR
  36. set fil=%src%\inscfg32.dl_
  37. unpack %fil% %trg% >> %log%
  38. IF ERRORLEVEL 1 GOTO UNPACK_ERR
  39. if .%3. == .. set cid=&& goto skipcid
  40. set cid=/u
  41. :skipcid
  42. %trg%\os2\install\dspinstl.exe /pk:other /sk:none /s:%src% /t:%trg%\ /pd:%dsc% /l:%log% %cid%
  43. if .%cfg%. == .. goto skipcfg
  44. if exist %cfg% %cfg%
  45. :skipcfg
  46. %src%\product.exe %src% %trg% %cid%
  47. set  path=%apath%
  48. GOTO END
  49. :VER_NOT_OK
  50. @ECHO.
  51. @ECHO This fixpack is intended for OS/2 versions %ver% only !
  52. @ECHO This fixpack is intended for OS/2 versions %ver% only ! >> %log%
  53. @ECHO.
  54. goto end
  55. :LOG_PROBLEM
  56. @ECHO.
  57. @ECHO Error setting attributes on %log%
  58. @ECHO.
  59. goto end
  60. :UNPACK_ERR
  61. @ECHO.
  62. @ECHO Error unpacking %fil%
  63. @ECHO Error unpacking %fil% >> %log%
  64. @ECHO.
  65. goto end
  66. :MISSING
  67. @ECHO.
  68. @ECHO Cannot locate %missing%
  69. @ECHO Cannot locate %missing% >> %log%
  70. @ECHO.
  71. rem fall thru intended
  72. :USAGE
  73. ECHO.
  74. ECHO Usage: %0 [SOURCE_PATH:] [BOOTDRIVE:] {[CID]}
  75. ECHO.
  76. ECHO Use the optional CID parameter for CID installs
  77. :LOGUSAGE
  78. IF .%trg%. == .. GOTO END
  79. ECHO. >> %log%
  80. ECHO Usage: %0 [SOURCE_PATH:] [BOOTDRIVE:] {[CID]} >> %log%
  81. ECHO. >> %log%
  82. ECHO Use the optional CID parameter for CID installs >> %log%
  83. :END
  84.