mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
61b43b1eb8
Minor fixes and refactoring. https://github.com/rootless-containers/rootlesskit/compare/v0.14.4...v0.14.6 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
32 lines
729 B
Bash
Executable file
32 lines
729 B
Bash
Executable file
#!/bin/sh
|
|
|
|
: "${ROOTLESSKIT_VERSION:=v0.14.6}"
|
|
|
|
install_rootlesskit() {
|
|
case "$1" in
|
|
"dynamic")
|
|
install_rootlesskit_dynamic
|
|
return
|
|
;;
|
|
"")
|
|
export CGO_ENABLED=0
|
|
_install_rootlesskit
|
|
;;
|
|
*)
|
|
echo 'Usage: $0 [dynamic]'
|
|
;;
|
|
esac
|
|
}
|
|
|
|
install_rootlesskit_dynamic() {
|
|
export ROOTLESSKIT_LDFLAGS="-linkmode=external" install_rootlesskit
|
|
export BUILD_MODE=${GO_BUILDMODE}
|
|
_install_rootlesskit
|
|
}
|
|
|
|
_install_rootlesskit() (
|
|
echo "Install rootlesskit version ${ROOTLESSKIT_VERSION}"
|
|
for f in rootlesskit rootlesskit-docker-proxy; do
|
|
GOBIN="${PREFIX}" GO111MODULE=on go install ${BUILD_MODE} -ldflags="$ROOTLESSKIT_LDFLAGS" "github.com/rootless-containers/rootlesskit/cmd/${f}@${ROOTLESSKIT_VERSION}"
|
|
done
|
|
)
|