mirror of
https://github.com/TokTok/c-toxcore
synced 2026-06-03 19:11:29 +00:00
33 lines
451 B
Bash
Executable File
33 lines
451 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e -u -x
|
|
|
|
JOB="$1"
|
|
ENV="$2"
|
|
PHASE="$3"
|
|
STAGE=""
|
|
|
|
set +u
|
|
if [ ! -z "$4" ] ; then
|
|
STAGE="$4"
|
|
fi
|
|
set -u
|
|
|
|
. "other/travis/env.sh"
|
|
. "other/travis/env-$ENV.sh"
|
|
|
|
try_source() {
|
|
SCRIPT="other/travis/$1"
|
|
if [ -f "$SCRIPT" ]; then
|
|
. "$SCRIPT"
|
|
fi
|
|
if [ ! -z "$STAGE" ] && [ -f "$SCRIPT-$STAGE" ]; then
|
|
. "$SCRIPT-$STAGE"
|
|
fi
|
|
}
|
|
|
|
try_source "$PHASE"
|
|
try_source "$ENV-$PHASE"
|
|
try_source "$JOB-$PHASE"
|
|
try_source "$JOB-$ENV-$PHASE"
|