2022-03-12 18:18:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# HOMEBREW_LIBRARY is set by bin/brew
|
|
|
|
# HOMEBREW_CCCFG and HOMEBREW_OPT are set by extend/ENV/super.rb
|
|
|
|
# shellcheck disable=SC2154
|
|
|
|
if [[ -z "${HOMEBREW_LIBRARY}" ]]
|
|
|
|
then
|
|
|
|
echo "${0##*/}: This shim is internal and must be run via brew." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
source "${HOMEBREW_LIBRARY}/Homebrew/shims/utils.sh"
|
|
|
|
|
2024-09-08 19:57:25 +08:00
|
|
|
parallel_args=()
|
|
|
|
if [[ -n "${HOMEBREW_MAKE_JOBS}" ]]
|
|
|
|
then
|
|
|
|
parallel_args+=(-j "${HOMEBREW_MAKE_JOBS}")
|
|
|
|
fi
|
|
|
|
|
2022-03-12 18:18:14 +00:00
|
|
|
# shellcheck disable=SC2154
|
|
|
|
export HOMEBREW_CCCFG="O${HOMEBREW_CCCFG}"
|
2024-09-08 19:57:25 +08:00
|
|
|
try_exec_non_system "ninja" "${parallel_args[@]}" "$@"
|
2022-03-12 18:18:14 +00:00
|
|
|
|
|
|
|
echo "ninja: Shim failed to find ninja in PATH."
|
|
|
|
exit 1
|