Skip to content

Commit

Permalink
build: make build/goimports.sh more potable
Browse files Browse the repository at this point in the history
  • Loading branch information
hackmod committed Jun 26, 2018
1 parent 4612918 commit 909e968
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 909e968

Please sign in to comment.