Forked from simonewebdesign/install_sublime_text.sh
Last active
August 29, 2015 14:04
-
-
Save dee1337/80b24a66c5e6a0cd97d9 to your computer and use it in GitHub Desktop.
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 | |
# Sublime Text 3 install with Package Control | |
# http://simonewebdesign.it/blog/install-sublime-text-3-on-fedora-20/ | |
# fix by dee1337: | |
# select the correct ST3 version depending on the system - 64bit build does not work on fedora i686 32bit | |
# Run this script with: | |
# $ curl LINK_TO_THIS_SCRIPT | sh | |
TEST=$(uname -m) | |
if [[ $TEST == *x86_64* ]];then | |
echo "downloading 64bit Version of Sublime Text..." | |
curl -o ~/st3.tar.bz2 http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x64.tar.bz2 | |
else | |
echo "downloading 32bit Version of Sublime Text..." | |
curl -o ~/st3.tar.bz2 http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x32.tar.bz2 | |
fi | |
if tar -xf ~/st3.tar.bz2 --directory=$HOME; then | |
sudo mv ~/sublime_text_3/ /opt/ | |
sudo ln -s /opt/sublime_text_3/sublime_text /bin/subl | |
fi | |
rm ~/st3.tar.bz2 | |
# Package Control - The Sublime Text Package Manager: https://sublime.wbond.net | |
curl -o ~/Package\ Control.sublime-package https://sublime.wbond.net/Package%20Control.sublime-package | |
sudo mv ~/Package\ Control.sublime-package /opt/sublime_text_3/Packages/ | |
# Add to applications list | |
cat << EOF > ~/.local/share/applications/sublime.desktop | |
[Desktop Entry] | |
Name=Sublime Text | |
Exec=subl %F | |
MimeType=text/plain; | |
Terminal=false | |
Type=Application | |
Icon=/opt/sublime_text_3/Icon/128x128/sublime-text.png | |
Categories=Utility;TextEditor;Development; | |
EOF | |
echo "" | |
echo "Sublime Text 3 installed successfully!" | |
echo "Run with: subl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if you are getting an error after installing Simone's version because you're on a 32bit system ( https://gist.github.com/simonewebdesign/8507139 ), you have to remove the following directories, before using this fixed version:
sudo rm /bin/subl
sudo rm -fr /opt/sublime_text_3/