Skip to content

Instantly share code, notes, and snippets.

@solrevdev
Created February 21, 2019 11:56
Show Gist options
  • Save solrevdev/ba052c2248305e67f355b31f67a307f5 to your computer and use it in GitHub Desktop.
Save solrevdev/ba052c2248305e67f355b31f67a307f5 to your computer and use it in GitHub Desktop.
updates all installed global dotnet tools
set -e # stops the execution of a script if a command or pipeline has an error
set -x # executed commands are printed to the terminal
# for each tool in the list ignoring first 2 rows which are table headers run dotnet tool update
for package in $(dotnet tool list -g | awk 'NR > 2 { print $1 }')
do
dotnet tool update -g "$package"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment