summaryrefslogtreecommitdiff
path: root/hack/make/.install
blob: 0e80a8e196a256d3e640ad8902a2dff8b0ec94cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

install_binary() {
	local file="$1"
	local target="${DOCKER_MAKE_INSTALL_PREFIX:=/usr/local}/bin/"
	if [ "$(go env GOOS)" == "linux" ]; then
		echo "Installing $(basename $file) to ${target}"
		mkdir -p "$target"
		cp -f -L "$file" "$target"
	else
		echo "Install is only supported on linux"
		return 1
	fi
}