Exit Bash Script on Error (#381)
* Update p9.sh * Update z13.sh * Update p9.sh * Update p9.sh * enable LLVM
This commit is contained in:
parent
53ab014a1d
commit
6580b47e25
|
@ -1,10 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit on error:
|
||||||
|
set -e
|
||||||
|
|
||||||
# Check for required env variables ONNF_DEP_DIR, LLVM_PROJECT_ROOT
|
# Check for required env variables ONNF_DEP_DIR, LLVM_PROJECT_ROOT
|
||||||
if [[ -z "${ONNF_DEP_DIR}" ]]; then
|
if [[ -z "${ONNF_DEP_DIR}" ]]; then
|
||||||
echo "ONNF_DEP_DIR env var is missing."
|
echo "ONNF_DEP_DIR env var is missing."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${LLVM_PROJECT_ROOT}" ]]; then
|
if [[ -z "${LLVM_PROJECT_ROOT}" ]]; then
|
||||||
echo "LLVM_PROJECT_ROOT env var is missing."
|
echo "LLVM_PROJECT_ROOT env var is missing."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit on error:
|
||||||
|
set -e
|
||||||
|
|
||||||
# Check for required env variables JAVA_HOME
|
# Check for required env variables JAVA_HOME
|
||||||
if [[ -z "${JAVA_HOME}" ]]; then
|
if [[ -z "${JAVA_HOME}" ]]; then
|
||||||
echo "JAVA_HOME env var is missing."
|
echo "JAVA_HOME env var is missing."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${LLVM_PROJECT_ROOT}" ]]; then
|
||||||
|
echo "LLVM_PROJECT_ROOT env var is missing."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set up mock installation path:
|
# Set up mock installation path:
|
||||||
export INSTALL_PATH=$WORKSPACE/INSTALL_PATH
|
export INSTALL_PATH=$WORKSPACE/INSTALL_PATH
|
||||||
mkdir -p $INSTALL_PATH
|
mkdir -p $INSTALL_PATH
|
||||||
|
|
Loading…
Reference in New Issue