Skip to content

Instantly share code, notes, and snippets.

@rockymontana
Created July 10, 2013 05:20
Show Gist options
  • Save rockymontana/5963670 to your computer and use it in GitHub Desktop.
Save rockymontana/5963670 to your computer and use it in GitHub Desktop.
Installing Sublime Text 3 from source on a Linux based system
#!/bin/sh
SCRIPT="#!/bin/sh
if [ \${1} == \"--help\" ]; then
/usr/local/sublime_text_3/sublime_text --help
else
/usr/local/sublime_text_3/sublime_text \$@ > /dev/null 2>&1 &
fi"
curl -L "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3047_x64.tar.bz2" -o "/tmp/sublime_text_3.tar.bz2"
cd /tmp
tar -xvjf "sublime_text_3.tar.bz2"
cd "sublime_text_3"
sudo cp sublime_text.desktop /usr/share/applications/sublime_text_3.desktop
echo "desktop file put in /usr/share/applications/"
sudo mkdir -pv /usr/local/sublime_text_3
sudo chown $USER:$USER /usr/local/sublime_text_3
mv -fvR * /usr/local/sublime_text_3/
echo "${SCRIPT}" > "sublime_runnable"
sudo mv sublime_runnable /usr/local/bin/sublime
echo "script put in /usr/local/bin/"
sudo chmod +x "/usr/local/bin/sublime"
echo "Finish!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment