Skip to content

Instantly share code, notes, and snippets.

@justinvt
Created March 11, 2011 21:19
Show Gist options
  • Save justinvt/866601 to your computer and use it in GitHub Desktop.
Save justinvt/866601 to your computer and use it in GitHub Desktop.
A zsh function to install textmate bundles from git repos
function get_bundle(){
bundle_dir="/Library/Application\ Support/TextMate/Bundles"
mkdir -p $bundle_dir
bundle_name=$(echo -e $1 | grep -o -P "[\w\.]+$" | sed -e 's/\.git$//g' -e 's/\.tmbundle//g')
checkout="git clone $1 $bundle_dir/$bundle_name.tmbundle"
dest=$bundle_dir/$bundle_name.tmbundle
rm -Rf $dest
git clone $1 $dest
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