Skip to content

Commit 8fc4e73

Browse files
committed
orka: add files for packer
1 parent 7eb79ae commit 8fc4e73

File tree

4 files changed

+75
-0
lines changed

4 files changed

+75
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
source /Users/admin/.zprofile
3+
if [ $IMAGE_ARCHITECTURE = x64 ]; then
4+
echo "Re-numerating admin account. This takes a while to chmod"
5+
dscl . -change /Users/admin UniqueID 501 107
6+
time find /Users/admin -uid 501 -exec chown -h 107 {} \;
7+
dscl . create /Groups/ci
8+
dscl . create /Groups/ci gid 107
9+
dscl . create /Groups/ci passwd '*'
10+
dscl . create /Groups/ci GroupMembership admin
11+
echo "Finally done."
12+
fi
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>Label</key>
6+
<string>com.mount9p.plist</string>
7+
<key>RunAtLoad</key>
8+
<true/>
9+
<key>StandardErrorPath</key>
10+
<string>/var/log/mount_9p_error.log</string>
11+
<key>StandardOutPath</key>
12+
<string>/var/log/mount_9p.log</string>
13+
<key>ProgramArguments</key>
14+
<array>
15+
<string>/bin/bash</string>
16+
<string>-c</string>
17+
<string>mkdir -p /Volumes/orka && mount_9p orka</string>
18+
</array>
19+
</dict>
20+
</plist>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Host node-www
2+
HostName direct.nodejs.org
3+
User staging
4+
IdentityFile ~/.ssh/id_rsa
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
XCODE_VERSION=$1
6+
7+
if [[ -n $DEBUG ]]; then
8+
set -x
9+
fi
10+
11+
cd ~/Desktop
12+
cp /Volumes/orka/Xcode/Xcode_${XCODE_VERSION}.xip ~/Desktop/Xcode.xip
13+
14+
if [ ! -d Xcode.app ]; then
15+
echo "Unpacking… This will take several minutes"
16+
xip --expand Xcode.xip
17+
fi
18+
19+
if [ -d /Applications/Xcode.app ]; then
20+
echo "Removing old Xcode"
21+
rm -rf /Applications/Xcode.app
22+
fi
23+
24+
echo "Moving new Xcode into place"
25+
mv Xcode.app /Applications
26+
27+
sudo xcode-select -s /Applications/Xcode.app
28+
29+
echo "Accepting the license agreement"
30+
sudo xcodebuild -license accept
31+
32+
echo "Installing internal packages to avoid the first launch prompt"
33+
sudo xcodebuild -runFirstLaunch
34+
35+
sudo DevToolsSecurity -enable
36+
37+
rm -f Xcode.xip
38+
39+
echo "Done!"

0 commit comments

Comments
 (0)