genrule() should fail if any command fails

If a genrule is a complex sequence of shell commands the rule
should fail if any of the commands fails and its exit status was
not examined.

Fixes https://github.com/facebook/buck/issues/21
diff --git a/src/com/facebook/buck/rules/Genrule.java b/src/com/facebook/buck/rules/Genrule.java
index e29ad9a..116c613 100644
--- a/src/com/facebook/buck/rules/Genrule.java
+++ b/src/com/facebook/buck/rules/Genrule.java
@@ -227,7 +227,7 @@
 
     // Create a shell command that corresponds to this.cmd.
     final String cmd = replaceBinaryBuildRuleRefsInCmd();
-    final ImmutableList<String> commandArgs = ImmutableList.of("/bin/bash", "-c", cmd);
+    final ImmutableList<String> commandArgs = ImmutableList.of("/bin/bash", "-ec", cmd);
     ImmutableMap.Builder<String, String> environmentVariablesBuilder = ImmutableMap.builder();
 
     addEnvironmentVariables(environmentVariablesBuilder);