mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
full diff: https://github.com/rootless-containers/rootlesskit/compare/v2.3.4...v2.3.5 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
32 lines
729 B
Bash
Executable File
32 lines
729 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# When updating, also update go.mod and Dockerfile accordingly.
|
|
: "${ROOTLESSKIT_VERSION:=v2.3.5}"
|
|
|
|
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}"
|
|
GOBIN="${PREFIX}" go install ${BUILD_MODE} -ldflags="$ROOTLESSKIT_LDFLAGS" "github.com/rootless-containers/rootlesskit/v2/cmd/rootlesskit@${ROOTLESSKIT_VERSION}"
|
|
)
|