home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / jbuilder.zip / addenv.cmd next >
OS/2 REXX Batch file  |  2003-04-05  |  489b  |  15 lines

  1. /* MAINTAINER: Gili Tzabari (L8R@email.com)
  2.    PLATFORM: OS/2 or eCS
  3.  
  4.    The following REXX code appends the the second argument to the environment setting associated with
  5.    the first argument.
  6.  
  7.    For example, "addenv path c:\mytoy;" executes "set path=%path%;c:\mytoy"
  8. */
  9.  
  10. Parse Arg args
  11. if (value(word(args, 1),,'OS2ENVIRONMENT')='') then
  12.   'set ' || word(args, 1) || '=' || word(args, 2)
  13. else
  14.   'set ' || word(args, 1) || '=%' || word(args, 1) || '%;' || word(args, 2)
  15.