Hi there,
I made myself a simple script to compile Fortran programs using the “make” command. I wanted the compilation window to automatically close on successful compilation, so this script basically reads :
htmlHeader "Compiling current programs using Make" echo "<h1>Starting Fortran Compile</h1>" echo
cd "$TM_DIRECTORY" make|pre status=$? echo "status = "${status} if [[ "${status}" -ne "0" ]]; then echo "<h1>Compilation Failed</h1>" else echo "<h1>Compilation Successful</h1>" # closeWindow fi htmlFooter
The problem is that, even when the compilation fails, the $status is equal to 0…
http://img220.imageshack.us/img220/8341/image1po1.jpg
What did I do wrong ? How do I fix this ?
Thanks in advance.
PS : I don't know if I'm the only one, but using Safari for the RSS feed for this mailing list, I receive EVERY message twice… Rather annoying…
On 18. Oct 2006, at 11:32, guerom00 wrote:
htmlHeader "Compiling current programs using Make"
You may want to move to the new html_header which is obtained by:
. "$TM_SUPPORT_PATH/lib/webpreview.sh"
[...] make|pre [...] The problem is that, even when the compilation fails, the $status is equal to 0…
The problem is that when you do ‘foo|bar’ then the result of the entire command is that of the last command in the chain.
Not really sure what a clean workaround would be, but you can do:
make &> >(pre)
This runs ‘pre’ as a new process with its input set to the output of make (both stdout and stderr), but since this is not a normal pipe (but process substitution) the result of the entire expression is that of make.
The link on the wiki to the GetBundles bundle by Sebastian Gräßl (http://validcode.net/stuff/textmate-getbundle-bundle) is broken and I can't seem to find it on the base site of the link.
Does anyone have a secondary link to it somewhere? === ~Adam
The link on the wiki to the GetBundles bundle by Sebastian Gräßl (http://validcode.net/stuff/textmate-getbundle-bundle) is broken and I can't seem to find it on the base site of the link.
Does anyone have a secondary link to it somewhere?
I don't think it's hosted anywhere right now but you can get it from the bundle repository. Check the manual here: http://macromates.com/textmate/manual/bundles#getting_more_bundles - just replace Haskell with GetBundle in the example.