Or, hey, we can just modify the path and avoid the problem altogether:

        if. IFUNIX do.
          ...
        else.

          new     =.  ; ,&';'@:dquote@:jpath&.> '~install/tools/',L:0;:'ftp zip'
          current =.  2!:5 p=.'PATH'
          assert. 'SetEnvironmentVariable' win32apir p;oldPATH,newPATHS

          HTTPCMD =:  'wget.exe -O %O -o %L -t %T %U'
          UNZIP   =:   unzip.exe -o -C '
        end.
   
Though this may cause problems if the user has an incompatible version of wget 
earlier on his path.  But it does mean that the absolute path to wget needn't 
be given, so its format is immaterial.

By the way, it'd be nice if  2!:5  had a dyadic valence whereby  'foo' 2!:5 
'bar'  set the environment variable 'foo' to 'bar' irrespective of host system. 
 I'm pretty sure Raul (?) asked for this too, a while back, but I can't find 
the message.

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to