Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Last active June 10, 2018 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtrouton/59947b6d451981da7a5f4069eedd9934 to your computer and use it in GitHub Desktop.
Save rtrouton/59947b6d451981da7a5f4069eedd9934 to your computer and use it in GitHub Desktop.
Section added to install_xcode_command_line_tools.sh to detect if Apple's softwareupdate command line tool has returned more than one Xcode command line tool installation option.
# Check to see if the softwareupdate tool has returned more than one Xcode
# command line tool installation option. If it has, use the last one listed
# as that should be the latest Xcode command line tool installer.
if (( $(grep -c . <<<"$cmd_line_tools") > 1 )); then
cmd_line_tools_output="$cmd_line_tools"
cmd_line_tools=$(printf "$cmd_line_tools_output" | tail -1)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment