Fixed command substitution.
This commit is contained in:
parent
8c677795a0
commit
75934861b4
|
@ -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}"
|
||||||
|
|
Loading…
Reference in New Issue