From 0712d0c899cbd259e4b9c426305e6bb6e88a1d8f Mon Sep 17 00:00:00 2001 From: akallabeth Date: Wed, 3 Apr 2024 10:41:47 +0200 Subject: [PATCH] [build,mac] check required tools are installed --- scripts/bundle-mac-os.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/bundle-mac-os.sh b/scripts/bundle-mac-os.sh index acb213b96..8bd387d19 100755 --- a/scripts/bundle-mac-os.sh +++ b/scripts/bundle-mac-os.sh @@ -22,6 +22,22 @@ usage () { echo "target [$DEPLOYMENT_TARGET]" } +check_tools() { + for TOOL in mkdir rm mv git dirname pwd find cut basename grep xargs cmake ninja autoconf automake aclocal autoheader glibtoolize lipo otool install_name_tool; + do + set +e + TOOL_PATH=$(which "$TOOL") + set -e + echo "$TOOL: $TOOL_PATH" + + if [ ! -f "$TOOL_PATH" ]; + then + echo "Missing $TOOL! please install and add to PATH." + exit 1 + fi + done +} + while [[ $# -gt 0 ]]; do case $1 in -a|--arch) @@ -49,6 +65,8 @@ while [[ $# -gt 0 ]]; do esac done +check_tools + fix_rpath() { SEARCH_PATH=$1 FIX_PATH=$1