summaryrefslogtreecommitdiff
path: root/scripts/linux
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-05-13 15:10:26 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-05-13 15:21:56 -0700
commit4db34bd9efc7c54088e8bcbdf8daae760cc5cdc0 (patch)
tree0237e659dc58928edb6a3ced407e07c2d04596d5 /scripts/linux
parentb334b7ee4ef83b28635f6409db1d6ec8630da91d (diff)
downloadqtlocation-mapboxgl-4db34bd9efc7c54088e8bcbdf8daae760cc5cdc0.tar.gz
Don't do things that set -e in Travis's shell
Sourcing files that set flags bleed into Travis' wrapper script, which messes with their workflow, e.g. preventing after_failure scripts from triggering. These changes fix that: * Move exported variables from install.sh to setup.sh, so install.sh doesn't have to be sourced. * Source setup.sh from run.sh, rather than directly from .travis.yml. In addition, as a good practice, remove `set -e` etc. from setup.sh, and add a comment not to add them back. It's the sourcing script's responsibility to set these flags.
Diffstat (limited to 'scripts/linux')
-rwxr-xr-xscripts/linux/install.sh2
-rwxr-xr-xscripts/linux/run.sh2
-rwxr-xr-xscripts/linux/setup.sh5
3 files changed, 6 insertions, 3 deletions
diff --git a/scripts/linux/install.sh b/scripts/linux/install.sh
index 1504da2a1f..a254d312ec 100755
--- a/scripts/linux/install.sh
+++ b/scripts/linux/install.sh
@@ -5,7 +5,7 @@ set -o pipefail
mapbox_time "checkout_mason" \
git submodule update --init .mason
-export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
+PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" \
mapbox_time "install_mesa" \
mason install mesa 10.4.3
diff --git a/scripts/linux/run.sh b/scripts/linux/run.sh
index 6a703fc7fb..daaa35b249 100755
--- a/scripts/linux/run.sh
+++ b/scripts/linux/run.sh
@@ -3,6 +3,8 @@
set -e
set -o pipefail
+source ./scripts/linux/setup.sh
+
BUILDTYPE=${BUILDTYPE:-Release}
################################################################################
diff --git a/scripts/linux/setup.sh b/scripts/linux/setup.sh
index 15b664862e..af0eafb5cf 100755
--- a/scripts/linux/setup.sh
+++ b/scripts/linux/setup.sh
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
+# This script is sourced; do not set -e or -o pipefail here.
-set -e
-set -o pipefail
+# Ensure mason is on the PATH
+export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
# Set the core file limit to unlimited so a core file is generated upon crash
ulimit -c unlimited -S