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