The validation script from #10681 is too pedantic, and does not handle well situations like: ``` cat <<EOF # or <<-EOF Whether the leading whitespace is stripped out or not by bash it should still be considered as valid. EOF ``` This reverts commit 4e65c1c319afffc325853b88c9aef0c42ec83482. Signed-off-by: Tibor Vass <tibor@docker.com> Upstream-commit: 0252ad0adc37a34b88fa908ae74a13b940febdcb Component: engine
23 lines
703 B
Bash
23 lines
703 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
DEST=$1
|
|
|
|
if [ -z "$DOCKER_CLIENTONLY" ]; then
|
|
source "$(dirname "$BASH_SOURCE")/.dockerinit"
|
|
|
|
hash_files "$DEST/dockerinit-$VERSION"
|
|
else
|
|
# DOCKER_CLIENTONLY must be truthy, so we don't need to bother with dockerinit :)
|
|
export DOCKER_INITSHA1=""
|
|
fi
|
|
# DOCKER_INITSHA1 is exported so that other bundlescripts can easily access it later without recalculating it
|
|
|
|
(
|
|
export IAMSTATIC="false"
|
|
export LDFLAGS_STATIC_DOCKER=''
|
|
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
|
|
export BUILDFLAGS=( "${BUILDFLAGS[@]/static_build /}" ) # we're not building a "static" binary here
|
|
source "$(dirname "$BASH_SOURCE")/binary"
|
|
)
|