Hi, <br><br>I'm not sure whats going wrong here, but I'm trying to use the system command supplied by <br>(require scheme/system) or (require (lib "process.ss" "mzlib"))<br><br>It seems to get a different version of $PATH on my osx machine<br>
<br>this code; <br>;#lang scheme/base<br>;(require scheme/system)<br>(require (lib "process.ss" "mzlib"))<br>;(system "svn add svn-commit.scm")<br>(system "echo $PATH")<br>(system "svn commit -m \"auto-commit\"")<br>
<br>returns this; <br>Welcome to DrScheme, version 372 [3m].<br>Language: Pretty Big (includes MrEd and Advanced Student) custom; memory limit: 128 megabytes.<br>/usr/bin:/bin:/usr/sbin:/sbin<br>#t<br>/bin/sh: line 1: svn: command not found<br>
#f<br>> <br><br>but when I use the terminal I get <br>$ echo $PATH<br>/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin<br><br>I'm assuming that; <br>1. $PATH is [normally] the same for bash and /bin/sh <br>
ie <br>$ /bin/sh<br>sh-2.05b$ echo $PATH<br>/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin<br><br>2. the system command supplied by (require scheme/system) and (require (lib "process.ss" "mzlib")) is the same<br>
<br>It seems I am wrong about 1 and the /etc/profile and .profile are bash specific and don't run for /bin/sh and therefore my commands don't have access to the modified path.<br><br>I'd rather not hard code the path, as I want this to run on a variety of machines; <br>
- does anyone have any suggestions on how best to make this work?<br><br clear="all">Cheers,<br><br>Stephen<br><br>--<br>Stephen De Gabrielle<br><a href="mailto:s.degabrielle@ucl.ac.uk">s.degabrielle@ucl.ac.uk</a><br>Telephone +44 (0)20 7679 5242 (x45242)<br>
Mobile 079 851 890 45<br>Project: Making Sense of Information (MaSI)<br><a href="http://www.uclic.ucl.ac.uk/annb/MaSI.html">http://www.uclic.ucl.ac.uk/annb/MaSI.html</a><br><br>UCLIC: University College London Interaction Centre<br>
<a href="http://www.uclic.ucl.ac.uk/">http://www.uclic.ucl.ac.uk/</a><br><br>Remax House - 31/32 Alfred Place<br>London - WC1E 7DP