This will build in the current directory minus the .c extension.<br><br>TM_FILENAME_BASE=`echo $TM_FILENAME | cut -d\. -f1`<br>#echo Base Filename: "$TM_FILENAME_BASE"<br><br>echo '<pre>'<br>cd "$TM_DIRECTORY"
<br>cc -I. -o "$TM_FILENAME_BASE" "$TM_FILENAME"<br>if (($? >= 1)); then exit; else echo "build successful"; fi<br>echo '</pre>'<br><br># cc must be in your path, if you've installed OS X gcc package you should be fine
<br><br>This will build and run the file your working on and display the output.  The object file is filename minus the .c extension.<br>TM_FILENAME_BASE=`echo $TM_FILENAME | cut -d\. -f1`<br>#echo Base Filename: "$TM_FILENAME_BASE"
<br><br>echo '<pre>'<br>cd "$TM_DIRECTORY"<br>cc -I. -o "$TM_FILENAME_BASE" "$TM_FILENAME"<br>if (($? >= 1)); then exit; fi<br>./"${TM_FILENAME_BASE}"<br>echo '</pre>'
<br><br># cc must be in your path, if you've installed OS X gcc package you should be fine<br><br>'njoy,<br>Mark<br>