Skip to content

Commit

Permalink
Merge pull request #17087 from OpenCommunityCoin/build/portable-shell
Browse files Browse the repository at this point in the history
build: make build/goimports.sh more potable
  • Loading branch information
karalabe authored Jun 27, 2018
2 parents 598f786 + 909e968 commit e916f97
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions build/goimports.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/usr/bin/env bash
#!/bin/sh

find_files() {
find . -not \( \
find . ! \( \
\( \
-wholename '.github' \
-o -wholename './build/_workspace' \
-o -wholename './build/bin' \
-o -wholename './crypto/bn256' \
-o -wholename '*/vendor/*' \
-path '.github' \
-o -path './build/_workspace' \
-o -path './build/bin' \
-o -path './crypto/bn256' \
-o -path '*/vendor/*' \
\) -prune \
\) -name '*.go'
}

GOFMT="gofmt -s -w";
GOIMPORTS="goimports -w";
find_files | xargs $GOFMT;
find_files | xargs $GOIMPORTS;
GOFMT="gofmt -s -w"
GOIMPORTS="goimports -w"
find_files | xargs $GOFMT
find_files | xargs $GOIMPORTS

0 comments on commit e916f97

Please sign in to comment.