Created
October 28, 2013 22:12
-
-
Save nrdobie/7205729 to your computer and use it in GitHub Desktop.
Installs Sublime Text 3 on Linux. Make sure to mark as executable.
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 | |
SHORTCUT="[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=Sublime Text 3 | |
GenericName=Text Editor | |
Comment=Sophisticated text editor for code, markup and prose | |
Exec=/usr/local/sublime-text-3/sublime_text %F | |
Terminal=false | |
MimeType=text/plain; | |
Icon=/usr/local/sublime-text-3/Icon/128x128/sublime-text.png | |
Categories=TextEditor;Development; | |
StartupNotify=true | |
Actions=Window;Document; | |
[Desktop Action Window] | |
Name=New Window | |
Exec=/usr/local/sublime-text-3/sublime_text -n | |
OnlyShowIn=Unity; | |
[Desktop Action Document] | |
Name=New File | |
Exec=/usr/local/sublime-text-3/sublime_text --command new_file | |
OnlyShowIn=Unity; | |
" | |
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 23>&1 & | |
fi" | |
curl -L "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3047_x64.tar.bz2" -o "/usr/src/Sublime Text 3.tar.bz2" | |
cd /usr/src | |
tar -xvjf "Sublime Text 3.tar.bz2" | |
cd "sublime_text_3" | |
mkdir -pv "/usr/local/sublime-text-3" | |
mv -fv * "/usr/local/sublime-text-3/" | |
echo "${SCRIPT}" > "/usr/local/bin/sublime" | |
chmod +x "/usr/local/bin/sublime" | |
echo "${SHORTCUT}" > "/usr/share/applications/sublime-text-3.desktop" | |
echo "Finish!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment