github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/hack/dockerfile/install/install.sh (about) 1 #!/bin/bash 2 3 set -e 4 set -x 5 6 RM_GOPATH=0 7 8 TMP_GOPATH=${TMP_GOPATH:-""} 9 10 : ${PREFIX:="/usr/local/bin"} 11 12 if [ -z "$TMP_GOPATH" ]; then 13 export GOPATH="$(mktemp -d)" 14 RM_GOPATH=1 15 else 16 export GOPATH="$TMP_GOPATH" 17 fi 18 19 dir="$(dirname $0)" 20 21 bin=$1 22 shift 23 24 if [ ! -f "${dir}/${bin}.installer" ]; then 25 echo "Could not find installer for \"$bin\"" 26 exit 1 27 fi 28 29 . ${dir}/${bin}.installer 30 install_${bin} "$@"