From 023cdeeee4fc743499d4ae9ea721e9faa3b84d85 Mon Sep 17 00:00:00 2001 From: Andy Herbota Date: Wed, 20 Jan 2021 14:10:32 +0800 Subject: [PATCH 1/2] Ensure Xcode CLI Tools has most recent version selected --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 7b6464a..e2a362d 100644 --- a/install.sh +++ b/install.sh @@ -23,14 +23,14 @@ echo "highlight OverLength ctermbg=red ctermfg=white guibg=#592929" >> ~/.vimrc; echo "match OverLength /\\%81v.\\+/" >> ~/.vimrc; # install Xcode Command Line Tools -# https://github.com/timsutton/osx-vm-templates/blob/ce8df8a7468faa7c5312444ece1b977c1b2f77a4/scripts/xcode-cli-tools.sh +# https://github.com/timsutton/osx-vm-templates/blob/dc2d3b29a12cfecb40d5ca6b839bd4c9c48f70bc/scripts/xcode-cli-tools.sh touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress; PROD=$(softwareupdate -l | grep "\*.*Command Line" | - head -n 1 | awk -F"*" '{print $2}' | + tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n') -softwareupdate -i "$PROD" -v; +softwareupdate -i "$PROD" --verbose; ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; brew install \ From a203390b6720aaa4b0864acf9afb25d871607c04 Mon Sep 17 00:00:00 2001 From: Andy Herbota Date: Wed, 20 Jan 2021 16:12:57 +0800 Subject: [PATCH 2/2] Support for Catalina softwareupdate output --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e2a362d..0119ed9 100644 --- a/install.sh +++ b/install.sh @@ -23,12 +23,12 @@ echo "highlight OverLength ctermbg=red ctermfg=white guibg=#592929" >> ~/.vimrc; echo "match OverLength /\\%81v.\\+/" >> ~/.vimrc; # install Xcode Command Line Tools -# https://github.com/timsutton/osx-vm-templates/blob/dc2d3b29a12cfecb40d5ca6b839bd4c9c48f70bc/scripts/xcode-cli-tools.sh +# https://github.com/w0de/osx-vm-templates/blob/116bb0a3ea83557bafc8d8b754d1dd0497e2e181/scripts/xcode-cli-tools.sh touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress; PROD=$(softwareupdate -l | grep "\*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | - sed -e 's/^ *//' | + sed 's/Label: //g' | tr -d '\n') softwareupdate -i "$PROD" --verbose;