This is the mail archive of the
cygwin
mailing list for the Cygwin project.
cygwin bash include scripting and error code return question
- From: John Fairhall <john at utilibill dot com dot au>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Sun, 25 Mar 2012 22:50:33 +0000
- Subject: cygwin bash include scripting and error code return question
Hi,
I have a cygwin bash script running on 32 bit XP.
I have a windows BAT script calling bash, like so:
-------------------
bash mainScript.sh 2>&1 | tee %LOGFILE%
bash mailBuild.sh %ERRORLEVEL% %LOGFILE%
-------------------
What I was hoping was that bash would propagate the shell script's return code to the external OS, but as far as I can see the windows ERRORLEVEL is always 0.
Is there a way to make bash do this?
John.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple