#!/bin/bash if [ -z "${TM_SVN}" ]; then echo "You must define the location of your svn client in the variable TM_SVN." exit 1 fi 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... $TM_SVN up Erlang.tmbundle else echo Checking out Erlang bundle... $TM_SVN --username anon --password anon co http://macromates.com/svn/Bundles/trunk/Bundles/Erlang.tmbundle/ fi echo "Reloading bundles in TextMate..." osascript -e 'tell app "TextMate" to reload bundles' exit 0