Compare commits

...

2 Commits

Author SHA1 Message Date
T. R. Bernstein
6cdd744093 Adapt path of brew caller script 2025-10-18 00:32:36 +02:00
T. R. Bernstein
604789d9a9 Always recreate brew caller script 2025-10-18 00:32:19 +02:00

View File

@@ -107,6 +107,7 @@ function createBrewCallerScript() {
local brewCallerPath="${homebrewRepositoryPath}/bin/brew-caller"
local brewCallerSymlink="/usr/local/bin/brew"
[ -f "${brewCallerPath}" ] && rm "${brewCallerPath}"
[ -f "${brewCallerSymlink}" ] && rm "${brewCallerSymlink}"
cat <<- BREWCALLER | clang -x c -O2 -Wall -o "${brewCallerPath}" -
#include <unistd.h>
#include <sys/types.h>
@@ -152,7 +153,7 @@ function createBrewCallerScript() {
target_gid = pw->pw_gid;
char *new_environ[] = {
"PATH=" HOMEBREW_DIR "/usr/bin:/bin",
"PATH=" HOMEBREW_DIR ":/usr/bin:/bin:/usr/sbin:/sbin",
"HOMEBREW_CACHE=${homebrew_cache}",
"HOMEBREW_LOGS=${homebrew_log}",
format_env("HOME", "%s"),