Skip to content

Instantly share code, notes, and snippets.

@rrmhearts
Last active April 22, 2020 20:34
Show Gist options
  • Save rrmhearts/481a45dc063a34f85fba842cfd66df9d to your computer and use it in GitHub Desktop.
Save rrmhearts/481a45dc063a34f85fba842cfd66df9d to your computer and use it in GitHub Desktop.
Visual Studio Code on Clear Linux
#!/bin/bash
# delete previous version if needed
INSTALL_DIR=/usr/share/code
if [ -d "$INSTALL_DIR" ]; then
echo "deleting: $INSTALL_DIR"
sudo rm -rf $INSTALL_DIR
fi
# download the rpm from https://code.visualstudio.com/download
sudo swupd bundle-add cpio package-utils
sudo rpm2cpio code-*.rpm | ( cd /; cpio -idv)
# https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
sudo echo "fs.inotify.max_user_watches=524288" | sudo tee --append /etc/sysctl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment