public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
git-tmbundle / Commands / Update Git Bundle.tmCommand
100644 47 lines (40 sloc) 1.031 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>beforeRunningCommand</key>
  <string>nop</string>
  <key>command</key>
  <string>#!/usr/bin/env ruby
 
require ENV['TM_BUNDLE_SUPPORT'] + '/environment.rb'
require 'erb'
include ERB::Util
 
g = SCM::Git.new
Dir.chdir(ENV['TM_BUNDLE_PATH'])
 
puts &lt;&lt;-EOF
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Update Git Bundle&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
EOF
 
puts "&lt;h2&gt;Updating git bundle&lt;/h2&gt;"
flush
 
puts " &lt;pre&gt;"
puts g.with_path(ENV['TM_BUNDLE_PATH']).command("pull")
puts &lt;&lt;-EOF
  &lt;/pre&gt;
&lt;/body&gt;
&lt;/html&gt;
EOF
 
%x{osascript -e 'tell app "TextMate" to reload bundles'}</string>
  <key>input</key>
  <string>none</string>
  <key>name</key>
  <string>Update Git Bundle</string>
  <key>output</key>
  <string>showAsHTML</string>
  <key>uuid</key>
  <string>9EAEC1C1-9979-4DB8-9877-A619580412AA</string>
</dict>
</plist>