Commit d887a31b authored by Andrew Gerrand's avatar Andrew Gerrand

misc/osx: don't set GOROOT or modify profile files

There's no reason to set GOROOT as the tools will have the path baked
into it with GOROOT_FINAL.

R=bradfitz, bytbox, gustavo, rsc
CC=golang-dev
https://golang.org/cl/5576064
parent 32f011e4
#!/bin/bash
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# The output of this script will be eval'd by the user's shell on startup. This
# script decides what type of shell is being used in the same way as
# /usr/libexec/path_helper
if echo $SHELL | grep csh$ > /dev/null; then
echo 'setenv GOROOT /usr/local/go'
else
echo 'export GOROOT=/usr/local/go'
fi
...@@ -13,34 +13,32 @@ fi ...@@ -13,34 +13,32 @@ fi
BUILD=/tmp/go.build.tmp BUILD=/tmp/go.build.tmp
ROOT=`hg root` ROOT=`hg root`
export GOROOT=$BUILD/root/usr/local/go
export GOROOT_FINAL=/usr/local/go
echo "Removing old images" echo "Removing old images"
rm -f *.pkg *.dmg rm -f *.pkg *.dmg
echo "Preparing temporary directory" echo "Preparing temporary directory"
rm -rf ${BUILD} rm -rf $BUILD
mkdir -p ${BUILD} mkdir -p $BUILD
echo "Preparing template"
mkdir -p ${BUILD}/root/usr/local/
echo "Copying go source distribution" echo "Copying go source distribution"
cp -r $ROOT ${BUILD}/root/usr/local/go mkdir -p $BUILD/root/usr/local
cp -r etc ${BUILD}/root/etc cp -r $ROOT $GOROOT
cp -r etc $BUILD/root/etc
echo "Building go" echo "Building go"
pushd . > /dev/null pushd $GOROOT > /dev/null
cd ${BUILD}/root/usr/local/go
GOROOT=`pwd`
src/version.bash -save src/version.bash -save
rm -rf .hg .hgignore .hgtags rm -rf .hg .hgignore .hgtags
cd src cd src
./all.bash | sed "s/^/ /" ./all.bash | sed "s/^/ /"
cd ..
popd > /dev/null popd > /dev/null
echo "Building package" echo "Building package"
${PM} -v -r ${BUILD}/root -o "Go `hg id`.pkg" \ # $PM came from utils.bahs
$PM -v -r $BUILD/root -o "Go `hg id`.pkg" \
--scripts scripts \ --scripts scripts \
--id com.googlecode.go \ --id com.googlecode.go \
--title Go \ --title Go \
...@@ -48,4 +46,4 @@ ${PM} -v -r ${BUILD}/root -o "Go `hg id`.pkg" \ ...@@ -48,4 +46,4 @@ ${PM} -v -r ${BUILD}/root -o "Go `hg id`.pkg" \
--target "10.5" --target "10.5"
echo "Removing temporary directory" echo "Removing temporary directory"
rm -rf ${BUILD} rm -rf $BUILD
...@@ -9,11 +9,6 @@ find bin -exec chmod ugo+rx \{\} \; ...@@ -9,11 +9,6 @@ find bin -exec chmod ugo+rx \{\} \;
find . -type d -exec chmod ugo+rx \{\} \; find . -type d -exec chmod ugo+rx \{\} \;
chmod o-w . 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" echo "Fixing debuggers via sudo.bash"
# setgrp procmod the debuggers (sudo.bash) # setgrp procmod the debuggers (sudo.bash)
cd $GOROOT/src cd $GOROOT/src
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment