github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/hack/dockerfile/install/shfmt.installer (about)

     1  #!/bin/sh
     2  
     3  : "${SHFMT_COMMIT:=01725bdd30658db1fe1b9e02173c3060061fe86f}" # v3.0.2
     4  
     5  install_shfmt() {
     6  	echo "Install shfmt version $SHFMT_COMMIT"
     7  	git clone https://github.com/mvdan/sh.git "$GOPATH/src/github.com/mvdan/sh"
     8  	cd "$GOPATH/src/github.com/mvdan/sh" || exit 1
     9  	git checkout -q "$SHFMT_COMMIT"
    10  	GO111MODULE=on go build -buildmode=pie -v -o "${PREFIX}/shfmt" ./cmd/shfmt
    11  }