summaryrefslogtreecommitdiff
path: root/misc/dist/darwin
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-03-04 21:27:36 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-04 21:27:36 +0100
commit04b08da9af0c450d645ab7389d1467308cfc2db8 (patch)
treedb247935fa4f2f94408edc3acd5d0d4f997aa0d8 /misc/dist/darwin
parent917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff)
downloadgolang-04b08da9af0c450d645ab7389d1467308cfc2db8.tar.gz
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'misc/dist/darwin')
-rw-r--r--misc/dist/darwin/Distribution32
-rw-r--r--misc/dist/darwin/Resources/bg.pngbin0 -> 11466 bytes
-rwxr-xr-x[-rw-r--r--]misc/dist/darwin/scripts/postinstall7
-rw-r--r--misc/dist/darwin/scripts/preinstall8
4 files changed, 41 insertions, 6 deletions
diff --git a/misc/dist/darwin/Distribution b/misc/dist/darwin/Distribution
new file mode 100644
index 000000000..8b764b69f
--- /dev/null
+++ b/misc/dist/darwin/Distribution
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<installer-script minSpecVersion="1.000000">
+ <title>Go</title>
+ <background mime-type="image/png" file="bg.png"/>
+ <options customize="never" allow-external-scripts="no"/>
+ <domains enable_localSystem="true" />
+ <installation-check script="installCheck();"/>
+ <script>
+function installCheck() {
+ if(!(system.compareVersions(system.version.ProductVersion, '10.6.0') >= 0)) {
+ my.result.title = 'Unable to install';
+ my.result.message = 'Go requires Mac OS X 10.6 or later.';
+ my.result.type = 'Fatal';
+ return false;
+ }
+ if(system.files.fileExistsAtPath('/usr/local/go/bin/go')) {
+ my.result.title = 'Previous Installation Detected';
+ my.result.message = 'A previous installation of Go exists at /usr/local/go. This installer will remove the previous installation prior to installing. Please back up any data before proceeding.';
+ my.result.type = 'Warning';
+ return false;
+ }
+ return true;
+}
+ </script>
+ <choices-outline>
+ <line choice="com.googlecode.go.choice"/>
+ </choices-outline>
+ <choice id="com.googlecode.go.choice" title="Go">
+ <pkg-ref id="com.googlecode.go.pkg"/>
+ </choice>
+ <pkg-ref id="com.googlecode.go.pkg" auth="Root">com.googlecode.go.pkg</pkg-ref>
+</installer-script>
diff --git a/misc/dist/darwin/Resources/bg.png b/misc/dist/darwin/Resources/bg.png
new file mode 100644
index 000000000..c3d8ea93a
--- /dev/null
+++ b/misc/dist/darwin/Resources/bg.png
Binary files differ
diff --git a/misc/dist/darwin/scripts/postinstall b/misc/dist/darwin/scripts/postinstall
index 3748721c7..4410a3004 100644..100755
--- a/misc/dist/darwin/scripts/postinstall
+++ b/misc/dist/darwin/scripts/postinstall
@@ -9,14 +9,9 @@ find bin -exec chmod ugo+rx \{\} \;
find . -type d -exec chmod ugo+rx \{\} \;
chmod o-w .
-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
+if [ -d "$XCODE_MISC_DIR" ]; then
echo " XCode"
cp $GOROOT/misc/xcode/* $XCODE_MISC_DIR
fi
diff --git a/misc/dist/darwin/scripts/preinstall b/misc/dist/darwin/scripts/preinstall
new file mode 100644
index 000000000..4cdaaa4bc
--- /dev/null
+++ b/misc/dist/darwin/scripts/preinstall
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+GOROOT=/usr/local/go
+
+echo "Removing previous installation"
+if [ -d $GOROOT ]; then
+ rm -r $GOROOT
+fi