-
Notifications
You must be signed in to change notification settings - Fork 3
/
Atom.munki.recipe
90 lines (83 loc) · 2.19 KB
/
Atom.munki.recipe
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?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>Identifier</key>
<string>com.grahamgilbert.munki.Atom</string>
<key>Input</key>
<dict>
<key>MUNKI_REPO_SUBDIR</key>
<string>apps/Atom</string>
<key>NAME</key>
<string>Atom</string>
<key>pkginfo</key>
<dict>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>category</key>
<string>Text Editors</string>
<key>description</key>
<string>A hackable text editor for the 21st Century</string>
<key>developer</key>
<string>GitHub, Inc.</string>
<key>display_name</key>
<string>Atom</string>
<key>name</key>
<string>%NAME%</string>
<key>postinstall_script</key>
<string>#!/bin/sh
# Simulate the "Atom -> Install Shell Commands"
# /usr/local/bin/atom
ATOM_SOURCE="/Applications/Atom.app/Contents/Resources/app/atom.sh"
ATOM_TARGET="/usr/local/bin/atom"
if [[ -f "${ATOM_SOURCE}" ]]; then
echo "Creating symbolic link ${ATOM_SOURCE} -> ${ATOM_TARGET}"
/bin/ln -s "${ATOM_SOURCE}" "${ATOM_TARGET}"
else
echo "${ATOM_SOURCE} doesn't exist..."
fi
# /usr/local/bin/apm
APM_SOURCE="/Applications/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm"
APM_TARGET="/usr/local/bin/apm"
if [[ -f "${APM_SOURCE}" ]]; then
echo "Creating symbolic link ${APM_SOURCE} -> ${APM_TARGET}"
/bin/ln -s "${APM_SOURCE}" "${APM_TARGET}"
else
echo "${APM_SOURCE} doesn't exist..."
fi
exit 0
</string>
<key>postuninstall_script</key>
<string>#!/bin/sh
# /usr/local/bin/atom
ATOM="/usr/local/bin/atom"
if [[ -L "${ATOM}" ]]; then
echo "Removing ${ATOM}"
/bin/rm -f "${ATOM}"
else
echo "${ATOM} doesn't exist..."
fi
# /usr/local/bin/apm
APM="/usr/local/bin/apm"
if [[ -L "${APM}" ]]; then
echo "Removing ${APM}"
/bin/rm -f "${APM}"
else
echo "${APM} doesn't exist..."
fi
exit 0
</string>
<key>unattended_install</key>
<true/>
<key>unattended_uninstall</key>
<true/>
<key>category</key>
<string>Developer</string>
</dict>
</dict>
<key>ParentRecipe</key>
<string>io.github.hjuutilainen.munki.Atom</string>
</dict>
</plist>