summaryrefslogtreecommitdiff
path: root/.gitlab/ci/pre_build.sh
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab/ci/pre_build.sh')
-rwxr-xr-x.gitlab/ci/pre_build.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/.gitlab/ci/pre_build.sh b/.gitlab/ci/pre_build.sh
new file mode 100755
index 0000000000..7ff6a69ad3
--- /dev/null
+++ b/.gitlab/ci/pre_build.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e
+
+quietly() {
+ readonly log="/tmp/quietly-$RANDOM.log"
+ if ! "$@" >"$log" 2>&1; then
+ ret=$?
+ cat "$log"
+ rm -f "$log"
+ exit $ret
+ fi
+ rm -f "$log"
+}
+
+if test -r ".gitlab/ci/pre_build_${CMAKE_CONFIGURATION}.sh"; then
+ source ".gitlab/ci/pre_build_${CMAKE_CONFIGURATION}.sh"
+fi