Created
November 21, 2008 19:18
-
-
Save shanesveller/27571 to your computer and use it in GitHub Desktop.
Sake task to update local version-controlled Textmate bundles
This file contains 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
desc 'Update all svn- and git-based bundles in TextMate' | |
task 'textmate:bundles:update' do | |
BUNDLES = (Dir[(ENV["HOME"] + "/Library/Application Support/TextMate/Bundles/*")] + Dir[(ENV["HOME"] + "/Library/Application Support/TextMate/Pristine Copy/Bundles/*")]) | |
for subdir in BUNDLES do | |
if File.exist?((subdir + "/.git/config")) then | |
sh("cd #{subdir.gsub(" ", "\\ ")} && git pull") | |
elsif File.exist?((subdir + "/.svn/entries")) then | |
sh("cd #{subdir.gsub(" ", "\\ ")} && svn up") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment