Sunday, April 22, 2007

HOWTO :: Erlang TextMate Bundle

#!/bin/sh

LC_CTYPE=en_US.UTF-8
SVN=`which svn`

echo Changing to Bundles directory...
mkdir -p /Library/Application\ Support/TextMate/Bundles
cd /Library/Application\ Support/TextMate/Bundles

if [ -d /Library/Application\ Support/TextMate/Bundles/Erlang.tmbundle ]; then
echo Erlang bundle already exists - updating...
$SVN up Erlang.tmbundle
else
echo Checking out Erlang bundle...
$SVN --username anon --password anon co http://svn.textmate.org/trunk/Bundles/Erlang.tmbundle/
fi

echo Reloading bundles in TextMate...
osascript -e 'tell app "TextMate" to reload bundles'



More here at netcetera

12 comments:

Magnus said...

Cool! I didn't even have to restart TextMate. Thanks!

Vita Rara said...

Thanks a lot. I'm just getting started with Erlang, and have gotten to really like TextMate.

Vitor Pellegrino said...

Great job!
Worked like a charm!

rasputnik said...

Not wanting to golf, but what does

SVN=`which svn` ; $SVN command...

gain you that a straight

svn command....

doesn't?

Stellar said...

Now that was easy.

skylar said...

works like a dream - thanks!

Carmine Noviello said...

Great! Thanks

juri said...

The path to the svn repository has changed:
http://svn.textmate.org/trunk/Bundles/Erlang.tmbundle/
instead of
http://macromates.com/svn/Bundles/trunk/Bundles/Erlang.tmbundle/

Amr Malik said...

Thanks @juri , I've changed the script.

moshisushi said...

Great bundle! Thanks

Radioxid said...

Awesome! As said, there's no need to restart TextMate!
Great work fellows!

Superpat said...

VERY useful - thanks for posting!