Zachary Hall
f91ff0f36f
Some checks failed
Build / download-system-deps (push) Successful in 1m12s
Build / build-gentoo (push) Successful in 1m25s
Build / get-source-code (push) Successful in 6m49s
Build / build-appimage (push) Successful in 2m46s
Build / build-android (push) Failing after 7m18s
Build / build-windows (push) Failing after 6m33s
32 lines
776 B
Bash
Executable file
32 lines
776 B
Bash
Executable file
#!/bin/bash
|
|
export OLD_DIR="$(pwd)"
|
|
cmd_err() {
|
|
CUR_DIR="$(pwd)"
|
|
code=$1
|
|
echo "Error: Command exited with non-zero status ($code)" >&2
|
|
echo "Directory: $CUR_DIR"
|
|
echo "Command: $2" >&2
|
|
cd $OLD_DIR
|
|
exit $code
|
|
}
|
|
on_err() {
|
|
echo "Script error."
|
|
cmd_err "$?" "$BASH_COMMAND"
|
|
}
|
|
run_command() {
|
|
trap ERR
|
|
echo "$@" >&2
|
|
"$@"
|
|
code=$?
|
|
if [ $code -ne 0 ]; then
|
|
cmd_err "$code" "$*"
|
|
fi
|
|
trap on_err ERR
|
|
}
|
|
trap on_err ERR
|
|
cd "$(dirname "$0")"
|
|
mkdir -p build
|
|
cd build
|
|
run_command cmake .. -DDISABLE_GTK_UI=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_C{,XX}_FLAGS="-O2 -march=native" -DBUILD_SOUNDTOUCH=ON
|
|
run_command cmake --build . "$@"
|
|
cd "$OLD_DIR"
|