-
Notifications
You must be signed in to change notification settings - Fork 2
/
pref_panes.rb
57 lines (52 loc) · 2.29 KB
/
pref_panes.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Pref Panes
# ----------
dep 'Growl.installer' do
source 'http://growl.cachefly.net/Growl-1.2.2.dmg'
#pkg_name 'Growl.pkg'
provides 'growlnotify'
met? {
'/Library/PreferencePanes/Growl.prefPane'.p.exist?
}
end
dep 'KeyRemap4MacBook.installer' do
source 'http://pqrs.org/macosx/keyremap4macbook/files/KeyRemap4MacBook-7.4.0.pkg.zip'
met? {
'/Library/PreferencePanes/KeyRemap4MacBook.prefPane'.p.exist?
}
end
dep 'MercuryMover.installer' do
# source 'http://www.heliumfoot.com/files/release/mercurymover/MercuryMover.dmg'
met? {
"/Library/PreferencePanes/MercuryMover.prefPane".p.exist?
}
meet {
log_shell("Downloading MercuryMover", "curl 'http://www.heliumfoot.com/files/release/mercurymover/MercuryMover.dmg' -o ~/Downloads/MercuryMover.dmg")
log_shell("Stripping EULA","/usr/bin/hdiutil convert -quiet ~/Downloads/MercuryMover.dmg -format UDTO -o ~/Downloads/mercury_mover")
log_shell("Mounting and creating local folder with contents of DMG","/usr/bin/hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint ~/Downloads/mercury_mover ~/Downloads/mercury_mover.cdr")
log_shell("Copying into /Library/PreferencePanes","sudo cp -r ~/Downloads/mercury_mover/MercuryMover.prefPane /Library/PreferencePanes")
after {
log "Detaching DMG and cleaning up (deleting downloaded files)"
shell("/usr/bin/hdiutil detach ~/Downloads/mercury_mover/")
"~/Downloads/MercuryMover.dmg".p.remove
"~/Downloads/mercury_mover.cdr".p.remove
}
}
end
# Not sure why I had to custom do this one...but it didn't work when I tried it.
dep 'teleport.installer' do
# source 'http://www.abyssoft.com/software/teleport/downloads/teleport.zip'
met? {
"/Library/PreferencePanes/teleport.prefPane".p.exist?
}
meet {
log_shell("Downloading teleport", "curl 'http://www.abyssoft.com/software/teleport/downloads/teleport.zip' -o ~/Downloads/teleport.zip")
log_shell("Unzipping","unzip -o ~/Downloads/teleport.zip -d ~/Downloads")
log_shell("Copying into /Library/PreferencePanes","sudo cp -r ~/Downloads/teleport/teleport.prefPane /Library/PreferencePanes")
after {
log "Cleaning up (deleting downloaded files)"
"~/Downloads/teleport.zip".p.remove
"~/Downloads/teleport".p.remove
"~/Downloads/__MACOSX".p.remove
}
}
end