+++ /dev/null
-Command binaries are installed in this directory.
-
-Mercurial does not maintain empty directories.
-This file helps.
+++ /dev/null
-Package binaries are installed in this directory tree.
-
-Mercurial does not maintain empty directories.
-This file helps.
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
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"}