$PIPESTATUS is an environment variable that holds the return values from any single, or chained commands in an array.... The page here should explain it far better than I can!:
http://www.linuxnix.com/2011/03/pipestatus-internal-variable.html
The && is a logical/boolean AND, similar to C, C++, Java etc.
As far as I understand it, the && inside the braces is part of the compound, boolean expression based on the commands contained in the braces. The && at the end of the line means that the next command (or line) in the bash script will only be executed if the commands to the left of the && (so basically if everything inside the braces) succeeds. So the next line or command in the shell script is the right hand part of the AND at the end of the code you've posted.
So it's kinda like:
If (make 2>&1 OR tee make.log AND exit $PIPESTATUS) AND NextLineOrCommand.....
So it's just a way of conditionally chaining several commands together.
At least I think that's the way it works!
JasonHippy
Practically a Posting Shark
862 posts since Jan 2009
Reputation Points: 615
Solved Threads: 146
Skill Endorsements: 5
Question Answered as of 6 Months Ago by
JasonHippy