Fixed command substitution.

This commit is contained in:
dataprolet 2024-04-15 13:33:39 +00:00
parent 8c677795a0
commit 75934861b4
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ echo "export PATH=$PATH:/opt/homebrew/bin" >> "$HOME/.zshrc"
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
# Get the latest version of the Command Line Tools # 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 # Install latest version
/usr/sbin/softwareupdate -i "${latest}" /usr/sbin/softwareupdate -i "${latest}"