Skip to content

Instantly share code, notes, and snippets.

@josemalcher
Forked from sayak-sarkar/sublime-text-3.sh
Last active August 29, 2015 14:17
Show Gist options
  • Save josemalcher/e07509b4c57a1aa3deba to your computer and use it in GitHub Desktop.
Save josemalcher/e07509b4c57a1aa3deba to your computer and use it in GitHub Desktop.
#!/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=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"
curl -L "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3080_x64.tar.bz2" -o "/usr/src/Sublime Text 3.tar.bz2"
cd /usr/src
tar -xvjf "sublime_text_3_build_3080_x64.tar.bz2"
cd "Sublime_Text_3"
mkdir -pv "/opt/sublime-text-3"
mv -fv * "/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/sublime
echo "Finish!"
@josemalcher
Copy link
Author

Atualização: build_3080

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