Skip to content

Instantly share code, notes, and snippets.

@Ishidres
Last active October 16, 2021 23:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Ishidres/b6133873d7fc6fde30f504c0599e8db7 to your computer and use it in GitHub Desktop.
Save Ishidres/b6133873d7fc6fde30f504c0599e8db7 to your computer and use it in GitHub Desktop.
Automatically updates Visual Studio Code by downloading the latest version and replacing the currently installed version with it.
notify-send "Updating Visual Studio Code..."
# killing VS Code will give you a crash message and will reopen it
# it's also unsafe because you might lose unsaved data
# pkill code
# automatically gets the latest version of VS Code
wget "https://update.code.visualstudio.com/latest/linux-x64/stable"
# remove currently installed version of VS Code and replace it with the new downloaded one
rm -r VSCode-linux-x64
tar -xf "stable"
rm "stable"
notify-send "Updating Visual Studio Code to latest version has finished."
cd ./VSCode-linux-x64
./code &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment