Skip to content

Instantly share code, notes, and snippets.

@OneOfOne
Created April 6, 2017 16:19
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 OneOfOne/0e784ce608d8a82a2783434434886080 to your computer and use it in GitHub Desktop.
Save OneOfOne/0e784ce608d8a82a2783434434886080 to your computer and use it in GitHub Desktop.
VSCode launcher / updater for the lazy.
#!/bin/sh
if [ "$1" = "update-vsc" ]; then
typ="stable"
[ "$2" != "" ] && typ="$2"
pushd /usr/src
rm -rf VSCode-linux-x64.working &>/dev/null
mv VSCode-linux-x64 VSCode-linux-x64.working &>/dev/null
echo curl -L https://vscode-update.azurewebsites.net/latest/linux-x64/$typ
curl -L https://vscode-update.azurewebsites.net/latest/linux-x64/$typ | tar vxz && exit 0
rm -rf VSCode-linux-x64 &>/dev/null
mv VSCode-linux-x64.working VSCode-linux-x64
exit 1
fi
if [ -x /usr/src/VSCode-linux-x64/bin/code-insiders ]; then
exec /usr/src/VSCode-linux-x64/bin/code-insiders $@
else
exec /usr/src/VSCode-linux-x64/bin/code $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment