0c350e87a0
reference:
https://github.com/docker/cli/pull/2507
4c99c81326
Signed-off-by: Xiaodong Liu <liuxiaodong@loongson.cn>
11 lines
382 B
Bash
Executable file
11 lines
382 B
Bash
Executable file
#!/bin/sh
|
|
|
|
: "${SHFMT_COMMIT:=01725bdd30658db1fe1b9e02173c3060061fe86f}" # v3.0.2
|
|
|
|
install_shfmt() {
|
|
echo "Install shfmt version $SHFMT_COMMIT"
|
|
git clone https://github.com/mvdan/sh.git "$GOPATH/src/github.com/mvdan/sh"
|
|
cd "$GOPATH/src/github.com/mvdan/sh" || exit 1
|
|
git checkout -q "$SHFMT_COMMIT"
|
|
GO111MODULE=on go build ${GO_BUILDMODE} -v -o "${PREFIX}/shfmt" ./cmd/shfmt
|
|
}
|