1
0
mirror of https://github.com/golang/go synced 2024-11-25 14:27:57 -07:00
go/misc/osx/scripts/postinstall
Scott Lawrence dd731478b8 misc/osx: Add scripts to create OS X package and disk image
Fixes #2327.

R=golang-dev, rsc, roberto, jdpoirier
CC=golang-dev
https://golang.org/cl/5375049
2011-11-18 19:05:53 -06:00

29 lines
702 B
Bash

#!/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