Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Installing TextMate bundles

View tm_bundle.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#!/bin/sh
 
############################################################################
# Run from your 'Home' folder.
# Replace 'Bundle Name' with exact name (include spaces but not ".tmbundle")
# ./tm_bundle.sh Bundle Name
#
# This script is adapted from the scripts in this list of bundles:
# http://netcetera.org/cgi-bin/tmbundles.cgi
# the 'official' bundle list with extensions is at:
# http://svn.textmate.org/trunk/Bundles/
#
# Dave Everitt 2010 (deveritt[at]innotts.co.uk)
# TO DO: add path to 'Bundles' as variable
############################################################################
 
 
# exit if errors:
set -e
 
LC_CTYPE=en_US.UTF-8
SVN=`which svn`
# get the bundle name (including spaces if any) with $*
# if a bundle name was not not given (! -n), quit
test ! -n "$*" && { echo No bundle name given - quitting.; exit 1; }
 
echo Changing to your Bundles directory...
# make the user's Bundles folder *only* if it doesn't exist (with -p)
mkdir -p "./Library/Application Support/TextMate/Bundles"
cd "./Library/Application Support/TextMate/Bundles"
 
# if bundle exists, update (overwrite) it, else intall into correct folder
if [ -d "./Library/Application Support/TextMate/Bundles/$*.tmbundle" ]
then
echo $* bundle already exists - updating...
$SVN up "$*.tmbundle"
else
echo Checking out bundle: $* ...
$SVN --username anon --password anon co "http://svn.textmate.org/trunk/Bundles/$*.tmbundle/"
fi
 
echo Reloading bundles in TextMate...
osascript -e 'tell app "TextMate" to reload bundles'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.