Created
April 10, 2011 17:00
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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