Skip to content

Instantly share code, notes, and snippets.

@mounirmesselmeni
Last active December 19, 2015 04:09
Show Gist options
  • Save mounirmesselmeni/5895264 to your computer and use it in GitHub Desktop.
Save mounirmesselmeni/5895264 to your computer and use it in GitHub Desktop.
Script to install sublime text 3 on Fedora 19 (18/17)
#!/bin/sh
SCRIPT="#!/bin/sh
if [ \${1} == \"--help\" ]; then
/opt/sublime_text/sublime_text --help
else
/opt/sublime_text/sublime_text
fi
"
tar -xvjf "$1"
sudo cp -fr "sublime_text_3/sublime_text.desktop" "/usr/share/applications/sublime_text.desktop"
sudo sed -i 's/Icon=sublime-text/Icon=\/opt\/sublime_text\/Icon\/128x128\/sublime-text.png/g' /usr/share/applications/sublime_text.desktop
sudo mv "sublime_text_3" "/opt/sublime_text"
sudo echo "${SCRIPT}" > "/usr/bin/sublime_text"
sudo chmod +x "/usr/bin/sublime_text"
echo "Finish!"
@ccouzens
Copy link

I've forked it. https://gist.github.com/ccouzens/7475347#file-sublime3_fedora19-sh

I've changed the /usr/bin/sublime_text from a script to a symbolic link.

Getting help still works:

sublime_text --help

Now files and directories can be used as parameters (this didn't work when it was a script):

sublime_text ~/example

@almereyda
Copy link

That's markable, @ccouzens. One should ask to change this gist, too. To spare some headaches.

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