blob: 2f2c53c783fac4f4d97bdea924249d0b71e8f4de [file] [log] [blame]
#!/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