Skip to content

Instantly share code, notes, and snippets.

@slavabez
Created August 12, 2018 07:58
Show Gist options
  • Save slavabez/494476949a54a9e932dcc19b31cdbaf0 to your computer and use it in GitHub Desktop.
Save slavabez/494476949a54a9e932dcc19b31cdbaf0 to your computer and use it in GitHub Desktop.
VS Code Insiders Linux update script
#!/bin/bash
file="/home/slava/Downloads/vscode-insider.tar.gz"
curl -L https://vscode-update.azurewebsites.net/latest/linux-x64/insider --output $file
if [ -z "$file" ]
then
echo "No file supplied, add the file"
exit 1
fi
if [[ $file == *.tar.gz ]]
then
# Proceed, it's a tar.gz file
# Make a temp directory for the vscode archive
mkdir /home/slava/temp
tar -xzf "$file" -C /home/slava/temp
# Move into the app folder
rm -rf /home/slava/Apps/code-insider/*
rsync -avhP /home/slava/temp/VSCode-linux-x64/* /home/slava/Apps/code-insider
# Delete the temp folder, cleanup
rm -rf /home/slava/temp
rm $file
exit 0
else
echo "The file is not a .tar.gz archive"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment