From 59f627914d257ecf430a87ee36d4514d58cc1c9b Mon Sep 17 00:00:00 2001 From: "T. R. Bernstein" <137705289+trbernstein@users.noreply.github.com> Date: Sat, 18 Oct 2025 00:54:21 +0200 Subject: [PATCH] Symlink brew caller only on intel cpu --- modules/04-install-brew.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/04-install-brew.sh b/modules/04-install-brew.sh index 349bb31..f66cbe7 100755 --- a/modules/04-install-brew.sh +++ b/modules/04-install-brew.sh @@ -102,12 +102,14 @@ function getHomebrewRepositoryPath() { function createBrewCallerScript() { ensureLocalBinFolder + local uname_machine=$(/usr/bin/uname -m) local username=${homebrew_username} local homebrewRepositoryPath="$(getHomebrewRepositoryPath)" local brewCallerPath="${homebrewRepositoryPath}/bin/brew-caller" local brewCallerSymlink="/usr/local/bin/brew" [[ -f "${brewCallerPath}" ]] && rm "${brewCallerPath}" [[ -f "${brewCallerSymlink}" || -h "${brewCallerSymlink}" ]] && rm "${brewCallerSymlink}" + [[ ${uname_machine} == "arm64" ]] && brewCallerPath=${brewCallerSymlink} cat <<- BREWCALLER | clang -x c -O2 -Wall -o "${brewCallerPath}" - #include #include @@ -186,7 +188,7 @@ function createBrewCallerScript() { BREWCALLER chown root:admin ${brewCallerPath} chmod 4550 ${brewCallerPath} - ln -s "${brewCallerPath}" "${brewCallerSymlink}" + [[ ${uname_machine} == "arm64" ]] || ln -s "${brewCallerPath}" "${brewCallerSymlink}" } function createBrewPeriodicScript() {