Unverified Commit e916f978 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub

Merge pull request #17087 from OpenCommunityCoin/build/portable-shell

build: make build/goimports.sh more potable
parents 598f786a 909e968e
#!/usr/bin/env bash #!/bin/sh
find_files() { find_files() {
find . -not \( \ find . ! \( \
\( \ \( \
-wholename '.github' \ -path '.github' \
-o -wholename './build/_workspace' \ -o -path './build/_workspace' \
-o -wholename './build/bin' \ -o -path './build/bin' \
-o -wholename './crypto/bn256' \ -o -path './crypto/bn256' \
-o -wholename '*/vendor/*' \ -o -path '*/vendor/*' \
\) -prune \ \) -prune \
\) -name '*.go' \) -name '*.go'
} }
GOFMT="gofmt -s -w"; GOFMT="gofmt -s -w"
GOIMPORTS="goimports -w"; GOIMPORTS="goimports -w"
find_files | xargs $GOFMT; find_files | xargs $GOFMT
find_files | xargs $GOIMPORTS; find_files | xargs $GOIMPORTS
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment