MediaWiki bundle for TextMate

From Stack Overflow
Jump to: navigation, search

The curent shipping version of TextMate does not contain a bundle for MediaWiki, but they do have one in their Subversion repository. Assuming you have the svn client installed, you can easily obtain/update the bundle with the following shell script:

#!/bin/sh
# Slightly modified from script at http://netcetera.org/cgi-bin/tmbundles.cgi

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/Mediawiki.tmbundle ]; then
	echo Mediawiki bundle already exists - updating...
	$SVN up "Mediawiki.tmbundle"
else
	echo Checking out Mediawiki bundle...
	$SVN --username anon --password anon co http://macromates.com/svn/Bundles/trunk/Bundles/Mediawiki.tmbundle/
fi

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