Skip to content

Instantly share code, notes, and snippets.

@SkeLLLa
Created July 9, 2018 09:52
Show Gist options
  • Save SkeLLLa/8709e1bd57c53668c8b901829368a67c to your computer and use it in GitHub Desktop.
Save SkeLLLa/8709e1bd57c53668c8b901829368a67c to your computer and use it in GitHub Desktop.
VScode linux update script
#!/usr/bin/env bash
APPLICATIONS_PATH="$HOME/Applications"
CODE_PATH="$APPLICATIONS_PATH/VSCode"
DOWNLOAD_URL="https://vscode-update.azurewebsites.net/latest/linux-x64/stable"
echo "Downloading $DOWNLOAD_URL..."
DOWNLOAD_PATH=$(mktemp)
curl -L $DOWNLOAD_URL --output $DOWNLOAD_PATH
echo "Downloaded to $DOWNLOAD_PATH"
echo "Removing old version..."
rm -rf $CODE_PATH
echo "Extracting to $CODE_PATH..."
mkdir -p $CODE_PATH
tar xzf $DOWNLOAD_PATH -C $CODE_PATH --strip 1
rm $DOWNLOAD_PATH%
@elsandosgrande
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment