Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gist to install Sublime Text 3 on RHEL 6 +
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/opt/sublime_text_3/sublime_text
Icon=/opt/sublime_text_3/Icon/128x128/sublime-text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
SCRIPT="#!/bin/sh
if [[ \${1} == \"--help\" ]]; then
/opt/sublime_text_3/sublime_text --help
else
/opt/sublime_text_3/sublime_text \$@ > /dev/null 2>&1 &
fi"
echo "Downloading Sublime Text 3..."
curl -L "https://download.sublimetext.com/sublime_text_3_build_3143_x64.tar.bz2" -o "/usr/src/Sublime Text 3.tar.bz2"
echo "Installing Sublime Text 3..."
echo -ne '##### (33%)\r'
cd /usr/src
tar -xvjf "Sublime Text 3.tar.bz2"
echo -ne '############# (66%)\r'
cd "sublime_text_3"
mv -fv "/usr/src/sublime_text_3" "/opt/sublime_text_3"
echo "${SCRIPT}" > "/usr/local/bin/subl"
chmod +x "/usr/local/bin/subl"
echo "${SHORTCUT}" > "/usr/share/applications/sublime-text-3.desktop"
ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime3
echo -ne '####################### (100%)\r'
# Package Control - The Sublime Text Package Manager: https://sublime.wbond.net
echo "Installing Package Control..."
wget --no-check-certificate https://sublime.wbond.net/Package%20Control.sublime-package
sudo mv Package\ Control.sublime-package "/opt/sublime_text_3/Packages/"
cd .config/sublime-text-3/Installed\ Packages/
wget https://packagecontrol.io/Package%20Control.sublime-package
echo "Finish!"
@jaipradeesh
Copy link

jaipradeesh commented Apr 30, 2015

@sayak-sarkar
Copy link
Author

sayak-sarkar commented Feb 24, 2016

Fixed the Tarball link and updated the gist to the latest 3103 build along with all of @ThePhoenixBird's fixes! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment