Skip to content

Instantly share code, notes, and snippets.

@ccouzens
Forked from mounirmesselmeni/sublime3_fedora19.sh
Last active December 28, 2015 08:59
Show Gist options
  • Save ccouzens/7475347 to your computer and use it in GitHub Desktop.
Save ccouzens/7475347 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Uninstall previous version
sudo rm -f "/usr/share/applications/sublime_text.desktop"
sudo rm -rf "/opt/sublime_text"
sudo rm -f "/usr/bin/sublime_text"
# Install new version
tar -xvjf "$1"
sudo cp -fr "sublime_text_3/sublime_text.desktop" "/usr/share/applications/sublime_text.desktop"
sudo sed -i 's/Icon=sublime-text/Icon=\/opt\/sublime_text\/Icon\/128x128\/sublime-text.png/g' /usr/share/applications/sublime_text.desktop
sudo mv "sublime_text_3" "/opt/sublime_text"
sudo ln -s "/opt/sublime_text/sublime_text" "/usr/bin/sublime_text"
echo "Finish!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment