spiegel-keyman/resources/build/mac/xcode-wrap.sh
Marc Durdin f03be501a6 maint(common): reorganize mac/ios build script includes
Move mac-specific build scripts and functions into our established
patterns for scripts under resources/build:

* new mac/mac.inc.sh for mac-specific functions, from mac-utils.inc.sh,
  utils.inc.sh, builder-basic.inc.sh
* move other mac-specific scripts into mac/

Relates-to: #14065
Build-bot: build
Test-bot: skip
2025-08-05 12:57:32 +10:00

16 lines
No EOL
599 B
Bash
Executable file

#!/usr/bin/env bash
# Keyman is copyright (C) SIL Global. MIT License.
# Runs a script using the homebrew version of bash from within an xcode script;
# we need this because xcode does not inherit paths from user's terminal
# environment.
echo "xcode-wrap: wrap script for arch $(arch)"
if [[ $(arch) == i386 ]] && [[ -f /usr/local/bin/bash ]]; then
/usr/local/bin/bash -l "$@" || exit $?
elif [[ $(arch) == arm64 ]] && [[ -f /opt/homebrew/bin/bash ]]; then
/opt/homebrew/bin/bash -l "$@" || exit $?
else
>&2 echo "xcode-wrap: Could not start build due to missing homebrew bash"
exit 55
fi