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