May 31, 2007 | Computers
This script has been updated
This script was updated on 2008/01/17. Since the version released here had a fatal flaw I have replaced the file linked below. Click here to see the details on the latest version of this script.
I’m lazy. I’ll admit it. It comes at weird expenses though. I’m too lazy to remember the subversion commands for updating TextMate bundles and keeping the support folder up to date, and the GetBundle bundle never seems to completely update or remember what it has updated, so I spend time learning how to script the damn thing via bash. Weird. But handy.
tmbundle.sh is the result of that effort. Its a pretty simple bash script that allows for listing available bundles, installing a bundle, and updating all installed bundles. This script is only for items from the Subversion repository of TextMate bundles, so if you haven’t pulled the SVN version of the HTML.tmbundle it will not update the default bundle that shipped with TM. It will not update a bundle that you have not already pulled from the SVN repository. Install only allows for installing one bundle at a time (I haven’t researched function overloading in bash yet).
Listing available bundles
This will show all bundles available in the SVN repository.
Installing a bundle
./tmbundle.sh install XML
This will install the XML bundle. The script will assume the .tmbundle extension if its not given, so telling it XML.tmbundle is the same as telling it just XML. Long names with spaces need to be encapsulated in quotes. So, for example:
Any install will automatically update the bundle support folder so that any dependencies are met.
This will update all the bundles that you have installed from SVN as well as the bundle support folder. If you need to just update one bundle, do an install instead.
So, that’s it. Pretty simple and nothing fancy. I’m sure others could easily improve on this or even encapsulate it in an automator action or maybe even using Pashua. For now, though, this works gangbusters for me, and hopefully helps one or two of you out there as well.