From b994c1315997945815e7b927b8493595b194d016 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 24 Jan 2014 23:01:12 -0700 Subject: [PATCH] Update hack/make.sh with slightly clearer output and a more precise "are we in the Docker container?" check Docker-DCO-1.1-Signed-off-by: Andrew Page (github: tianon) --- hack/make.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hack/make.sh b/hack/make.sh index 6029c9ec10..ef13c1a283 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -25,12 +25,18 @@ set -o pipefail # We're a nice, sexy, little shell script, and people might try to run us; # but really, they shouldn't. We want to be in a container! -RESOLVCONF=$(readlink --canonicalize /etc/resolv.conf) -grep -q "$RESOLVCONF" /proc/mounts || { - echo >&2 "# WARNING! I don't seem to be running in a docker container." - echo >&2 "# The result of this command might be an incorrect build, and will not be officially supported." - echo >&2 "# Try this: 'make all'" -} +if [ "$(pwd)" != '/go/src/github.com/dotcloud/docker' ] || [ -z "$DOCKER_CROSSPLATFORMS" ]; then + { + echo "# WARNING! I don't seem to be running in the Docker container." + echo "# The result of this command might be an incorrect build, and will not be" + echo "# officially supported." + echo "#" + echo "# Try this instead: make all" + echo "#" + } >&2 +fi + +echo # List of bundles to create when no argument is passed DEFAULT_BUNDLES=(