home *** CD-ROM | disk | FTP | other *** search
/ The Ultimedia Application / IBM_UCD_101.ISO / mmpm2 / mpmcdimg.cmd < prev    next >
OS/2 REXX Batch file  |  1992-05-06  |  3KB  |  111 lines

  1. /* -------------------WARNING------------------*/ 
  2. /* Do not change without notifying ROC Conder  */ 
  3. /* -------------------WARNING------------------*/ 
  4. /*            MPMCDIMG.CMD                     */ 
  5.  
  6. /* MultiMedia Installation Routine to make a Hard Disk image of the 
  7.    installation package and to modify the control files for hard disk.  */ 
  8.  
  9. parse upper arg DRIVE PATH 
  10. '@echo off' 
  11.  
  12. say '    ' 
  13. say "This CMD copies the MMPM/2 installation package from diskette to hard disk "
  14. say "and changes the control files to the correct ones for hard disk operation. "
  15. say "The hard disk installation package can then be used in response file "
  16. say "generation and installation."  
  17. say '    ' 
  18.  
  19. if length(DRIVE) <> 1 then call usage 
  20.  
  21. say "Usage: MPMCDIMG drive_letter [path]"  
  22. say '    ' 
  23. say '                '"PATH is any number of path levels but only the last one "
  24. say "                may not exist. More than one non-existent path level may "
  25. say "                cause errors."  
  26. say '    ' 
  27.  
  28. INPUTFILE='A:\CONTROL.SCR' 
  29. x=stream(INPUTFILE, 'c', 'close') 
  30.  
  31. signal on notready name fileclosed 
  32.  
  33. nextline=linein(INPUTFILE) 
  34. filelist='' 
  35. do forever 
  36.      nextline=linein(INPUTFILE) 
  37.      if nextline <> '' then 
  38.          do 
  39.          if (substr(nextline,1,9) = 'filelist=') then 
  40.               do 
  41.               filelist=substr(nextline,11,10) 
  42.               say "filelist = "filelist"" 
  43.               leave 
  44.               end 
  45.          end 
  46. end  /* do forever */ 
  47.  
  48. fileclosed: 
  49.     signal off notready 
  50.  
  51.     x=stream(INPUTFILE, 'c', 'close') 
  52.  
  53. if length(PATH) = 0 then 
  54.     do 
  55.     PATH='\MPMPACK' 
  56.     end 
  57. say "Copying MMPM/2 to hard disk."  
  58.  
  59. 'md' DRIVE':'PATH 
  60. 'attrib -R ' DRIVE':'PATH'\* /S >nul 2>nul' 
  61. say '    ' 
  62. say "Please insert" "IBM Multimedia Presentation Manager/2 Diskette 1" "into "
  63. say "diskette drive A:."  
  64. say '    ' 
  65. pause 
  66.  
  67. 'xcopy a:\*.* ' DRIVE':'PATH'\*.* /s /v    2>nul' 
  68. say '    ' 
  69. say "Please insert" "IBM Multimedia Presentation Manager/2 Diskette 2" "into "
  70. say "diskette drive A:."  
  71. say '    ' 
  72. pause 
  73.  
  74. 'xcopy a:\*.* ' DRIVE':'PATH'\*.* /s /v    2>nul' 
  75.  
  76. if (filelist="master.mm3") then 
  77.     do 
  78.     say '    ' 
  79.     say "Please insert" "IBM Multimedia Presentation Manager/2 Diskette 3" "into "
  80. say "diskette drive A:."  
  81.     say '    ' 
  82.     pause 
  83.  
  84.     'xcopy a:\*.* ' DRIVE':'PATH'\*.* /s /v    2>nul' 
  85.     end 
  86.  
  87. DRIVE':' 
  88. 'cd' PATH'\hdcontrl' 
  89. 'copy controlh.scr ..\control.scr' 
  90. 'copy masterhd.mmi ..\master.mm1' 
  91.  
  92. say "Package Generation Finished..."  
  93.  
  94. exit 0 
  95.  
  96. usage: 
  97. say '    ' 
  98. say "Usage: MPMCDIMG drive_letter [path]"  
  99. say '    ' 
  100. say "Where drive_letter = Drive on which to generate the package (this is "
  101. say "      required)."  
  102. say '     ' 
  103. say '      '"[path] = the path without drive letter where the package should be "
  104. say "      generated. (This is optional. The default is MPMPACK.)"  
  105. say '     ' 
  106. say '      '"PATH is any number of path levels but only the last one may not "
  107. say "      exist. More than one non-existent path level may cause errors."  
  108. say '     ' 
  109.  
  110. exit 0 
  111.