Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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"
@dee1337

This comment has been minimized.

Copy link
Owner Author

commented Jul 27, 2014

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.