diff --git a/modules/04-install-brew.sh b/modules/04-install-brew.sh index 69c73b7..df0bc6d 100755 --- a/modules/04-install-brew.sh +++ b/modules/04-install-brew.sh @@ -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 #include