Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 23 lines (19 sloc) 0.62 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/sh
#
# Install the Nu TextMate bundle from Jason Sallis' GitHub repository.
# Warning: This will remove any existing Nu.tmbundle.
#

BUNDLES_DIR="$HOME/Library/Application Support/TextMate/Bundles"
BUNDLE_NAME="Nu.tmbundle"
VERSION=`osascript -e 'tell application "TextMate" to version' | cut -d. -f1`

function getbundle () {
  git clone git://github.com/jsallis/nu.tmbundle.git $BUNDLE_NAME
}

if [ $VERSION -eq 2 ]; then
getbundle && open $BUNDLE_NAME
else
rm -rf "$BUNDLES_DIR/$BUNDLE_NAME"
  mkdir -pv $BUNDLES_DIR
  cd $BUNDLES_DIR
  getbundle && osascript -e 'tell app "TextMate" to reload bundles'
fi
Something went wrong with that request. Please try again.