Clean symlinks too for brew caller script

This commit is contained in:
T. R. Bernstein
2025-10-18 00:41:34 +02:00
parent 6cdd744093
commit ad7007a8ee

View File

@@ -106,8 +106,8 @@ function createBrewCallerScript() {
local homebrewRepositoryPath="$(getHomebrewRepositoryPath)"
local brewCallerPath="${homebrewRepositoryPath}/bin/brew-caller"
local brewCallerSymlink="/usr/local/bin/brew"
[ -f "${brewCallerPath}" ] && rm "${brewCallerPath}"
[ -f "${brewCallerSymlink}" ] && rm "${brewCallerSymlink}"
[[ -f "${brewCallerPath}" ]] && rm "${brewCallerPath}"
[[ -f "${brewCallerSymlink}" || -h "${brewCallerSymlink}" ]] && rm "${brewCallerSymlink}"
cat <<- BREWCALLER | clang -x c -O2 -Wall -o "${brewCallerPath}" -
#include <unistd.h>
#include <sys/types.h>