Home Download Buy Blog Forum Support

Linux Sublime update script.

Linux Sublime update script.

Postby Anomareh on Wed Mar 30, 2011 11:06 am

So I was getting tired of updating Sublime manually every time there was an update so I wrote this simple script to make it easier and figured I'd share it.

The usual warnings apply. Although everything should work fine, if you're computer explodes I take no responsibility and you're to use it at your own risk.

https://gist.github.com/894200

I recommend installing it to /usr/local/bin/subl-upd though it should run from anywhere fine.

It's setup for 64 bit by default, uncomment line 5 for 32 bit. It installs Sublime to /opt/subl/pkg/, the downloaded archives are stored in /opt/subl/src/, and it makes Sublime available from the command line via subl.

Code: Select all
List of commands:
  <ver#> - Update to the supplied version.
     example -> subl-upd 2053
  clean  - Removes all downloaded archives.
  remove - Removes Sublime completely.
  help   - This output.

To update or roll back to a previous version just type 'subl-upd <ver#>' (e.g. 'subl-upd 2053'). If the version was already downloaded it won't redownload it. It's convenient for easy rollbacks in case of a serious or annoying bug. 'clean' removes all the downloaded archives in /opt/subl/src/. 'remove' removes Sublime. It doesn't touch config files. It only removes /opt/subl/ and /usr/local/bin/subl.
Anomareh
 
Posts: 221
Joined: Thu Oct 01, 2009 7:32 pm

Re: Linux Sublime update script.

Postby quesada on Thu Mar 31, 2011 9:01 am

Thanks! this is a great script.
One very general question... I'm new to sublime so it might be trivial... all plugins seem to import sublime_plugin, and sublime. These are not in site_packages, and this script doesn't put them there either. So no plugin works. What's the convention for this? Or should we just add the /opt/subl folder to PYTHONPATH? Maybe I should ask in the plugin forum.
quesada
 
Posts: 31
Joined: Mon Mar 07, 2011 1:32 am

Re: Linux Sublime update script.

Postby Anomareh on Thu Mar 31, 2011 11:01 am

I think Sublime uses it's own version of Python. (/opt/subl/pkg/lib/python26.zip if you installed with the script) Plugins are working just fine on my end. What errors do you get in the console (ctrl + `)? Maybe there is a permissions issue somewhere?
Anomareh
 
Posts: 221
Joined: Thu Oct 01, 2009 7:32 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 10 guests