File: shfmt.installer

package info (click to toggle)
docker.io 20.10.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 59,648 kB
  • sloc: sh: 5,527; makefile: 616; ansic: 179; python: 162; asm: 7
file content (11 lines) | stat: -rwxr-xr-x 382 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/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
}