home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 30 fixes_v / 30-fixes_v.zip / vxrx20b.zip / PATCH.CMD < prev    next >
OS/2 REXX Batch file  |  1994-06-23  |  1KB  |  62 lines

  1. /*
  2.  * patch.cmd -- Patch VX-REXX 2.0A to 2.0B.
  3.  */
  4.  
  5. if( FileExists( 'VROBJ.DLL' ) \= 1 )then do
  6.     say "Please place the patch files and this command file in your"
  7.     say "VX-REXX directory and run the patch command from there."
  8.     exit
  9. end
  10.  
  11. say "Patching VX-REXX 2.0A to 2.0B...."
  12.  
  13. files = 'pmexe.exe vredit.dll vrobj.dll vrsed.dll vrxedit.exe'
  14.  
  15. address cmd
  16.  
  17. if( FileExists( 'PMEXE.NRZ' ) )then do
  18.     'copy pmexe.nrz pmexe.exe'
  19.     'erase pmexe.nrz'
  20. end
  21.  
  22. if( FileExists( 'PMRUN.NRZ' ) )then do
  23.     'copy pmrun.nrz pmrun.exe'
  24.     'erase pmrun.nrz'
  25. end
  26.  
  27. do i = 1 to words( files )
  28.     call Patch word( files, i )
  29. end
  30.  
  31. /* Patch the other files... */
  32.  
  33. 'bplevel pmdbg.exe pmdbg.b'
  34. 'bplevel vrx.exe vrx.b'
  35. 'bplevel progguid.inf progguid.b'
  36. 'bplevel a2z.inf a2z.b'
  37.  
  38. say "Rebuilding the folder..."
  39. call buildvrx
  40.  
  41. say "Patch done."
  42. exit
  43.  
  44.  
  45. Patch: procedure
  46.     arg file
  47.     name = left( file, pos( '.', file ) - 1 )
  48.     
  49.     say "Patching file" file || "..."
  50.     
  51.     'copy' file name || '.BAK'
  52.     'bpatch -p -b' name || '.B'
  53.     
  54.     if( rc = 0 )then do
  55.         'erase' name || '.B'
  56.     end
  57. return
  58.  
  59.  
  60. FileExists: procedure
  61. return( stream( arg(1), 'c', 'query exists' ) \= '' )
  62.