go.uber.org/yarpc@v1.72.1/etc/bin/vendor-build.sh (about) 1 #!/bin/bash 2 3 if [[ "$VERBOSE" == "1" ]]; then 4 set -x 5 fi 6 7 if [[ -z "$2" ]]; then 8 echo "USAGE: $0 DIR IMPORTPATH" 9 echo "" 10 echo "The binary at IMPORTPATH will be built and saved to DIR." 11 exit 1 12 fi 13 14 function die() { 15 echo "$1" >&2 16 exit 1 17 } 18 19 outputDir="$1" 20 importPath="$2" 21 22 GOBIN="$outputDir" go install "$importPath" \ 23 || die "Failed to build and install $importPath"