Skip to content

Instantly share code, notes, and snippets.

@shanesveller
Created November 21, 2008 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanesveller/27571 to your computer and use it in GitHub Desktop.
Save shanesveller/27571 to your computer and use it in GitHub Desktop.
Sake task to update local version-controlled Textmate bundles
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