shanesveller (owner)

Revisions

gist: 27571 Download_button fork
public
Description:
Sake task to update local version-controlled Textmate bundles
Public Clone URL: git://gist.github.com/27571.git
Embed All Files: show embed
textmate-bundles-update.sake.rb #
1
2
3
4
5
6
7
8
9
10
11
12
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