dmd/compiler/test/tools/postscript.sh
2022-07-09 18:53:07 +02:00

22 lines
412 B
Bash
Executable file

#!/usr/bin/env bash
# A wrapper for all postscript files which sets `-euo pipefail`
set -euo pipefail
script_file="$1"
shift
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# export common variables
source "$DIR/exported_vars.sh"
# Remove TEST_DIR and TEST_NAME
shift
shift
# called scripts should fail on errors and undefined variables
set -euo pipefail
set -x
source "${script_file}"