Skip to content

Instantly share code, notes, and snippets.

@sckv
Last active March 4, 2019 10:23
Show Gist options
  • Select an option

  • Save sckv/135eab8d4779b87fd5d577fe327dc02b to your computer and use it in GitHub Desktop.

Select an option

Save sckv/135eab8d4779b87fd5d577fe327dc02b to your computer and use it in GitHub Desktop.
Install or Update VSCode directly to Solus linux
#!/bin/bash
cd /tmp || exit
echo "Downloading VSCode ..."
wget -q https://go.microsoft.com/fwlink/?LinkID=620884 -O vscode-stable.tar.gz
tar -xzf vscode-stable.tar.gz
rm vscode-stable.tar.gz
echo "Installing to personal..."
if [ ! -d "$HOME/.installs" ];then
mkdir ~/.installs
fi
if [ -d "$HOME/.installs/VSCode" ];then
rm -rf ~/.installs/VSCode
fi
mv VSCode-linux-x64 ~/.installs/VSCode
echo "Creating symbolic link..."
if [ -L "/usr/bin/code" ];then
sudo rm -f /usr/bin/code
fi
sudo ln -s ~/.installs/VSCode/code /usr/bin/code
echo "Installation completed successfully."
echo "You can use VSCode!"
[Desktop Entry]
Encoding=UTF-8
Name=Visual Studio Code
Exec=code
Comment=Code Editing. Redefined.
Icon=code
Terminal=false
Type=Application
StartupNotify=true
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
Keywords=vscode;
# directory =>>> ~/.local/share/applications/VSCode.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment