Skip to content

Instantly share code, notes, and snippets.

@jamiew
Created April 10, 2011 17:00
Show Gist options
  • Save jamiew/912523 to your computer and use it in GitHub Desktop.
Save jamiew/912523 to your computer and use it in GitHub Desktop.
Updates the system-wide TextMate bundles + all your user bundles, with some notes for additions I want to make (e.g. subversion support in user bundles -- I have one that still uses svn)
#!/bin/bash
CORE_PATH="/Library/Application Support/TextMate/Bundles/"
USER_PATH="/Users/$(whoami)/Library/Application Support/TextMate/Bundles/"
echo "Updating core TextMate bundles..."
cd "${CORE_PATH}"
#svn up *.tmbundle
svn up
echo "Updating user Textmate bundles..."
cd "${USER_PATH}"
for dir in *; do
cd "${USER_PATH}${dir}"
# TODO also check for subversion
GITDIR=`git rev-parse --git-dir 2>/dev/null`
if [ -n "${GITDIR}" ]; then
echo "* ${dir}..."
git pull
fi
done
osascript -e 'tell app "TextMate" to reload bundles'
echo "Done updating Textmate bundles!"
# TODO should stash + pop initial directory
cd ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment