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.
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.
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.