]> Cypherpunks repositories - gostls13.git/commitdiff
build: create bin and pkg directories as needed; drop from hg
authorRuss Cox <rsc@golang.org>
Thu, 2 Sep 2010 18:20:02 +0000 (14:20 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 2 Sep 2010 18:20:02 +0000 (14:20 -0400)
R=dsymonds, r
CC=golang-dev
https://golang.org/cl/2050043

bin/~place-holder~ [deleted file]
pkg/~place-holder~ [deleted file]
src/env.bash
src/make.bash

diff --git a/bin/~place-holder~ b/bin/~place-holder~
deleted file mode 100644 (file)
index 04a2143..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Command binaries are installed in this directory.
-
-Mercurial does not maintain empty directories.
-This file helps.
diff --git a/pkg/~place-holder~ b/pkg/~place-holder~
deleted file mode 100644 (file)
index 0ea2de6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Package binaries are installed in this directory tree.
-
-Mercurial does not maintain empty directories.
-This file helps.
index b858e069b064543fcded49e0b65dfd3bb6f2cbde..d96d50cb2680a9797e6c74e823ca022af359ca23 100644 (file)
@@ -22,7 +22,7 @@ if [ "$DIR1" != "$DIR2" ]; then
 fi
 
 export GOBIN=${GOBIN:-"$GOROOT/bin"}
-if [ ! -d "$GOBIN" ]; then
+if [ ! -d "$GOBIN" -a "$GOBIN" != "$GOROOT/bin" ]; then
        echo '$GOBIN is not a directory or does not exist' 1>&2
        echo 'create it or set $GOBIN differently' 1>&2
        exit 1
index c778d922af60b0db6dbeb441c36f1bf4dbdb986a..0a0f49455f83e73704a3ec1befc67e4808728b5a 100755 (executable)
@@ -10,6 +10,12 @@ if [ ! -f env.bash ]; then
 fi
 . ./env.bash
 
+# Create target directories
+if [ "$GOBIN" = "$GOROOT/bin" ]; then
+       mkdir -p "$GOROOT/bin"
+fi
+mkdir -p "$GOROOT/pkg"
+
 GOROOT_FINAL=${GOROOT_FINAL:-$GOROOT}
 
 MAKEFLAGS=${MAKEFLAGS:-"-j4"}