Files
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

39 lines
877 B
Bash
Executable File

#! /bin/bash
#
# Script that calls build and install scripts together with the same arguments.
#
# If any intermediate step fails, the script (should) exit.
#
set -Eeuo pipefail
trap 'echo; echo "Script failed. Exiting" >&2; exit 1' ERR
SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
# For production be aware that the build path is part of the IREE error messages
# So choose it with care
DEFAULT_WORKING_DIR="$SCRIPT_DIR/../../Build"
if [ -z "${1-}" ]; then
mkdir -p "$DEFAULT_WORKING_DIR"
WORKING_DIR="$DEFAULT_WORKING_DIR"
else
WORKING_DIR="$1"
if [ ! -d "$WORKING_DIR" ]; then
echo "Error: '$WORKING_DIR' does not exist." >&2
exit 1
fi
fi
WORKING_DIR="$(cd "$WORKING_DIR" && pwd)"
echo
echo "Working dir: \"$WORKING_DIR\""
echo
"${SCRIPT_DIR}/BuildMac.sh" "$WORKING_DIR"
"${SCRIPT_DIR}/InstallMac.sh" "$WORKING_DIR"
exit 0