Skip to content

Instantly share code, notes, and snippets.

@kived
Created October 16, 2014 15:30
Show Gist options
  • Save kived/ff50d2a8a625a90b3631 to your computer and use it in GitHub Desktop.
Save kived/ff50d2a8a625a90b3631 to your computer and use it in GitHub Desktop.
p4a: use subshells for build
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