summaryrefslogtreecommitdiff
path: root/misc/osx/scripts/postinstall
blob: f8545b8b0232dc5434e38795b5fbabfc8f3a3784 (plain)
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
#!/bin/bash

GOROOT=/usr/local/go

echo "Fixing permissions"
cd $GOROOT
find . -exec chmod ugo+r \{\} \;
find bin -exec chmod ugo+rx \{\} \;
find . -type d -exec chmod ugo+rx \{\} \;
chmod o-w .

echo "Setting GOROOT system-wide"
echo "eval \`/etc/profile_go\`" >> /etc/csh.login
echo "eval \`/etc/profile_go\`" >> /etc/zshenv
echo "eval \`/etc/profile_go\`" >> /etc/profile

echo "Fixing debuggers via sudo.bash"
# setgrp procmod the debuggers (sudo.bash)
cd $GOROOT/src
./sudo.bash

echo "Installing miscellaneous files:"
XCODE_MISC_DIR="/Library/Application Support/Developer/Shared/Xcode/Specifications/"
if [ -f $XCODE_MISC_DIR ]; then
	echo "  XCode"
	cp $GOROOT/misc/xcode/* $XCODE_MISC_DIR
fi