2013-12-02 22:48:26 +00:00
|
|
|
#!/bin/bash
|
2014-04-08 04:14:19 +00:00
|
|
|
set -e
|
2013-10-18 05:40:41 +00:00
|
|
|
|
|
|
|
DEST=$1
|
|
|
|
|
2014-03-07 04:22:25 +00:00
|
|
|
if [ -z "$DOCKER_CLIENTONLY" ]; then
|
2015-01-17 05:00:44 +00:00
|
|
|
source "$(dirname "$BASH_SOURCE")/.dockerinit"
|
2015-03-25 17:38:17 +00:00
|
|
|
|
2014-03-20 01:58:39 +00:00
|
|
|
hash_files "$DEST/dockerinit-$VERSION"
|
2014-02-13 17:07:53 +00:00
|
|
|
else
|
2014-03-07 04:22:25 +00:00
|
|
|
# DOCKER_CLIENTONLY must be truthy, so we don't need to bother with dockerinit :)
|
|
|
|
export DOCKER_INITSHA1=""
|
2014-02-13 17:07:53 +00:00
|
|
|
fi
|
2015-01-17 05:00:44 +00:00
|
|
|
# DOCKER_INITSHA1 is exported so that other bundlescripts can easily access it later without recalculating it
|
2013-10-18 05:40:41 +00:00
|
|
|
|
2013-12-09 01:40:05 +00:00
|
|
|
(
|
2015-02-04 21:22:38 +00:00
|
|
|
export IAMSTATIC="false"
|
2015-02-23 18:19:51 +00:00
|
|
|
export LDFLAGS_STATIC_DOCKER=''
|
2014-06-19 20:35:30 +00:00
|
|
|
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
|
2015-02-09 16:30:09 +00:00
|
|
|
export BUILDFLAGS=( "${BUILDFLAGS[@]/static_build /}" ) # we're not building a "static" binary here
|
2013-12-09 01:40:05 +00:00
|
|
|
source "$(dirname "$BASH_SOURCE")/binary"
|
|
|
|
)
|