home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / uudbz003.zip / dbz_mksetup.cmd < prev    next >
OS/2 REXX Batch file  |  1997-07-27  |  1KB  |  40 lines

  1. /* Rexx */
  2. /* makedbz.cmd -- set environment variables so that dmake can */
  3. /* find the UUPC headers and libraries. */
  4.  
  5. parse arg addPath
  6.  
  7. if addPath = "" then
  8. do
  9.     say ""
  10.     say "Error in arguments!"
  11.     say ""
  12.     say "Usage:  makedbz additional-path"
  13.     say "        where the additional-path is the one"
  14.     say "        you wish to add to the C_INCLUDE_PATH"
  15.     say "        and LIBRARY_PATH environment variables"
  16.     say ""
  17.     exit(1);
  18. end
  19.  
  20. libPath = value('LIBRARY_PATH',, 'OS2ENVIRONMENT')
  21. incPath = value('C_INCLUDE_PATH',, 'OS2ENVIRONMENT')
  22. /* Tack the new path onto the old path */
  23. newLibPath = libPath||addPath
  24. newIncPath = incPath||addPath
  25.  
  26. /* Oops, let's check for '\' and translate them */
  27. newLibPath = Translate(newLibPath, '/', '\')
  28. newIncPath = Translate(newIncPath, '/', '\')
  29.  
  30. /* Now let's set them */
  31. libPath = value('LIBRARY_PATH', newLibPath, 'OS2ENVIRONMENT')
  32. say "LIBRARY_PATH was" libPath
  33. libPath = value('LIBRARY_PATH',, 'OS2ENVIRONMENT')
  34. say "LIBRARY_PATH now is" libPath
  35.  
  36. incPath = value('C_INCLUDE_PATH', newIncPath, 'OS2ENVIRONMENT')
  37. say "C_INCLUDE_PATH was" incPath
  38. incPath = value('C_INCLUDE_PATH',, 'OS2ENVIRONMENT')
  39. say "C_INCLUDE_PATH now is" incPath
  40.