diff --git a/Scripts/install-brew.sh b/Scripts/install-brew.sh index e1762c6..207d720 100644 --- a/Scripts/install-brew.sh +++ b/Scripts/install-brew.sh @@ -37,7 +37,7 @@ echo "export PATH=$PATH:/opt/homebrew/bin" >> "$HOME/.zshrc" touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress # Get the latest version of the Command Line Tools -latest="/usr/sbin/softwareupdate -l | grep -B 1 -E 'Command Line Tools' | awk -F '*' '/^ *\\*/ {print $2}' | sed -e 's/^ *Label: //' -e 's/^ *//' | sort -V | tail -n1" +latest=$(/usr/sbin/softwareupdate -l | grep -B 1 -E 'Command Line Tools' | awk -F '*' '/^ *\\*/ {print $2}' | sed -e 's/^ *Label: //' -e 's/^ *//' | sort -V | tail -n1) # Install latest version /usr/sbin/softwareupdate -i "${latest}"