Created
April 6, 2017 16:19
-
-
Save OneOfOne/0e784ce608d8a82a2783434434886080 to your computer and use it in GitHub Desktop.
VSCode launcher / updater for the lazy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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