home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gp371os2.zip / startgp.cmd < prev    next >
OS/2 REXX Batch file  |  1999-05-14  |  884b  |  31 lines

  1. /* StartGnuplot.cmd , startgp.cmd */
  2.  
  3. /* release 19990512 */
  4.  
  5. /*
  6.    Utility to _temporarily_ set the necessary environment variables for
  7.    the gnuplot binary in the same directory of this utility (often
  8.    called "startgp.cmd").
  9.    You may start it from an arbitrary directory then.
  10.    It passes all command line parameters to the gnuplot executable.
  11. */
  12.  
  13. Parse Arg param
  14. Parse Source os env full_name
  15.  
  16. call setlocal
  17. bindir   = FileSpec("path", full_name)
  18. bindrive = FileSpec("drive", full_name)
  19. binpath  = bindrive''bindir
  20. path     =  Value('PATH',,'OS2ENVIRONMENT')
  21. helpfile = bindrive''bindir'gnuplot.gih'
  22. call Value 'GNUHELP', helpfile, 'OS2ENVIRONMENT'
  23. call Value 'GNUPLOT', bindir,   'OS2ENVIRONMENT'
  24. call Value 'PATH', path';'binpath,   'OS2ENVIRONMENT'
  25.  
  26. /* the actual call to gnuplot */
  27. '@'bindrive''bindir'gnuplot.exe 'param
  28.  
  29. call endlocal
  30. exit
  31.