Created
September 27, 2012 20:43
-
-
Save LucasArruda/3796360 to your computer and use it in GitHub Desktop.
Install Sublime Text 2
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 | |
# Script to install a downloaded 'Sublime Text 2' editor. | |
# Make sure you follow the editors license | |
if [ -z "$1" ] | |
then | |
echo "\n Function usage:" | |
echo " $ ./install-sublime.sh Sublime\ Text\ 2.0.1.tar.bz2" | |
echo "\n (replace tar.bz2 file with correct name)" | |
exit 1 | |
fi | |
tar xf "$1" | |
sudo mv Sublime\ Text\ 2 /usr/lib/ | |
sudo ln -s /usr/lib/Sublime\ Text\ 2/sublime_text /usr/bin/sublime | |
sudo touch /usr/share/applications/sublime.desktop | |
#sudo echo $SUBLIME_DESK_ENTRY >> /usr/share/applications/sublime.desktop | |
sudo cat > /usr/share/applications/sublime.desktop <<EOF | |
[Desktop Entry] | |
Version=1.0 | |
Name=Sublime Text 2 | |
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings. | |
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. | |
GenericName=Text Editor | |
Exec=sublime | |
Terminal=false | |
Icon=/usr/lib/Sublime Text 2/Icon/48x48/sublime_text.png | |
Type=Application | |
Categories=TextEditor;IDE;Development | |
X-Ayatana-Desktop-Shortcuts=NewWindow | |
[NewWindow Shortcut Group] | |
Name=New Window | |
Exec=sublime -n | |
TargetEnvironment=Unity | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment