github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/hack/make/.install (about)

     1  #!/usr/bin/env bash
     2  
     3  install_binary() {
     4  	local file="$1"
     5  	local target="${DOCKER_MAKE_INSTALL_PREFIX:=/usr/local}/bin/"
     6  	if [ "$(go env GOOS)" == "linux" ]; then
     7  		echo "Installing $(basename $file) to ${target}"
     8  		mkdir -p "$target"
     9  		cp -f -L "$file" "$target"
    10  	else
    11  		echo "Install is only supported on linux"
    12  		return 1
    13  	fi
    14  }