home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxlepsom.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1995-09-14  |  2KB  |  62 lines

  1. /* REXX */
  2.  
  3.   call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4.   call SysLoadFuncs
  5.  
  6. say 'Enter the directory in your LIBPATH '
  7. say 'where you'd like to copy RXLEPSOM DLLs:'
  8. parse pull dllpath
  9. 'copy 123rexx.dll 'dllpath
  10. 'copy lepsom.dll 'dllpath
  11. 'copy rxlepsom.dll 'dllpath
  12.  
  13. drop yn
  14. do while \(yn='Y' | yn='y' | yn='N' | yn='n')
  15.     say 'Do you plan to use ObjectREXX with RXLEPSOM package?(Y/N)'
  16.     parse pull yn
  17. end
  18. yn=TRANSLATE(yn)
  19. if yn='Y' then do
  20.     /* Touch SOMIR environment variable in config.sys */
  21.     sysdrv=''
  22.     do while sysdrv=''
  23.         say 'Enter the drive letter where your config.sys resides'
  24.         parse pull sysdrv
  25.         sysdrv=translate(substr(sysdrv,1,1))
  26.         if verify(sysdrv, 'CDEFGHIJ')\=0 then sysdrv=''
  27.     end
  28.     config.sys=sysdrv||':\config.sys'
  29.     config.bak=sysdrv||':\config.bak'
  30.     config.new=sysdrv||':\config.new'
  31.     say 'Creating 'config.new ' containing corrected SOMIR declaration...'
  32.     'del 'config.new
  33.     do while lines(config.sys)
  34.         lin=linein(config.sys)
  35.         drop somir
  36.         parse var lin 'SET SOMIR='somir
  37.         if somir\="" then do
  38.             lepsom.ir=directory()||'\LEPSOM.IR;'
  39.             call lineout config.new,'SET SOMIR='||lepsom.ir||somir
  40.         end
  41.         else do
  42.             call lineout config.new, lin
  43.         end
  44.     end
  45.     call lineout config.sys
  46.     call lineout config.new
  47.     call lineout config.bak
  48.     drop yn
  49.     do while \(yn='Y' | yn='y' | yn='N' | yn='n')
  50.         say 'Would you like to replace your 'config.sys' with 'config.new'?(Y/N)'
  51.         parse pull yn
  52.     end
  53.     yn=TRANSLATE(yn)
  54.     if yn='Y' then do
  55.         'copy '||config.sys||' '||config.bak
  56.         'copy '||config.new||' '||config.sys
  57.     end
  58. end
  59.  
  60.  
  61. exit(0);
  62.