-
Notifications
You must be signed in to change notification settings - Fork 0
/
Xcode.munki.recipe
59 lines (53 loc) · 1.89 KB
/
Xcode.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
<?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.github.mkuron.munki.Xcode</string>
<key>Input</key>
<dict>
<key>MUNKI_REPO_SUBDIR</key>
<string>apps/appstore</string>
<key>NAME</key>
<string>Xcode</string>
<key>PATH</key>
<string>/Applications/Xcode.app</string>
<key>pkginfo</key>
<dict>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>display_name</key>
<string>%NAME%</string>
<key>name</key>
<string>%NAME%</string>
<key>unattended_install</key>
<true/>
<key>postinstall_script</key>
<string>#!/bin/bash
/usr/sbin/installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/MobileDevice.pkg -target /
/usr/sbin/installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/MobileDeviceDevelopment.pkg -target /
/usr/sbin/installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /
# accept the license
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -license accept
# disable docset updating
/usr/bin/defaults write /Library/Preferences/com.apple.dt.Xcode kXCDocCheckAndInstallUpdatesAutomatically -bool NO
# Enable developer mode policies
/usr/sbin/DevToolsSecurity -enable
# Add a group to developer group
/usr/sbin/dseditgroup -o edit -a everyone -t group _developer
# Install Command Line Tools
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
pkgname=$(softwareupdate --list | grep -A 1 '*' | grep -B 1 'Command Line' | head -n 1 | awk '{print $2}')
softwareupdate --install $pkgname
result=$?
rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
exit $result
</string>
</dict>
</dict>
<key>ParentRecipe</key>
<string>com.github.nmcspadden.munki.appstore</string>
</dict>
</plist>