Created
October 16, 2014 15:30
-
-
Save kived/ff50d2a8a625a90b3631 to your computer and use it in GitHub Desktop.
p4a: use subshells for build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/distribute.sh b/distribute.sh | |
index e891d66..2c3b0e6 100755 | |
--- a/distribute.sh | |
+++ b/distribute.sh | |
@@ -6,6 +6,9 @@ | |
# | |
#------------------------------------------------------------------------------ | |
+# Automatically export all variables/functions for subshells | |
+set -a | |
+ | |
MODULES=$(cat `dirname $0`/modules) | |
# Resolve Python path | |
@@ -672,7 +675,7 @@ function run_build() { | |
if [ "X$DO_BUILD" == "X1" ] || [ ! -f "$MARKER_FN" ]; then | |
debug "Call $fn" | |
rm -f "$MARKER_FN" | |
- $fn | |
+ try bash -c "$fn" | |
touch "$MARKER_FN" | |
else | |
debug "Skipped $fn" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment