forked from vmware-archive/pivotal_workstation
/
textmate_plugins.rb
31 lines (26 loc) · 1006 Bytes
/
textmate_plugins.rb
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
run_unless_marker_file_exists("textmate_plugins_0") do
execute "download ProjectPlus to temp dir" do
command "curl -o /tmp/projectplus.dmg http://ciaranwal.sh/projectplus-files/ProjectPlus-1.3.dmg"
user WS_USER
end
execute "mount dmg" do
command "hdid /tmp/projectplus.dmg"
user WS_USER
end
execute "clear out the existing plugin if it's there" do
command "rm -rf '#{WS_HOME}/Library/Application Support/TextMate/PlugIns/ProjectPlus.tmplugin'"
end
execute "make textmate plugins directory" do
command "mkdir -p '#{WS_HOME}/Library/Application Support/TextMate/PlugIns'"
user WS_USER
not_if { File.exists?("#{WS_HOME}/Library/Application Support/TextMate/PlugIns") }
end
execute "copy to TextMate" do
command "cp -Rf /Volumes/ProjectPlus/ProjectPlus.tmplugin '#{WS_HOME}/Library/Application Support/TextMate/PlugIns'"
user WS_USER
end
execute "unmount dmg" do
command "hdiutil detach /Volumes/ProjectPlus"
user WS_USER
end
end