summaryrefslogtreecommitdiff
path: root/misc/makerelease/darwin/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'misc/makerelease/darwin/scripts')
-rwxr-xr-xmisc/makerelease/darwin/scripts/postinstall10
-rwxr-xr-xmisc/makerelease/darwin/scripts/preinstall8
2 files changed, 18 insertions, 0 deletions
diff --git a/misc/makerelease/darwin/scripts/postinstall b/misc/makerelease/darwin/scripts/postinstall
new file mode 100755
index 000000000..13f5bff9b
--- /dev/null
+++ b/misc/makerelease/darwin/scripts/postinstall
@@ -0,0 +1,10 @@
+#!/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 .
diff --git a/misc/makerelease/darwin/scripts/preinstall b/misc/makerelease/darwin/scripts/preinstall
new file mode 100755
index 000000000..4cdaaa4bc
--- /dev/null
+++ b/misc/makerelease/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