aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-06-27 16:28:58 +0800
committerGitHub <noreply@github.com>2018-06-27 16:28:58 +0800
commite916f9786dd318ec873cab21c8092d4da2c8dd54 (patch)
tree73b79d5dc51c2f502ec70f0e695a4cf4afb0067f
parent598f786aabc8f8f998008a59094e76944f6c5bdc (diff)
parent909e968ebb733dc01150e4e67221fef1177b0c8c (diff)
downloaddexon-e916f9786dd318ec873cab21c8092d4da2c8dd54.tar
dexon-e916f9786dd318ec873cab21c8092d4da2c8dd54.tar.gz
dexon-e916f9786dd318ec873cab21c8092d4da2c8dd54.tar.bz2
dexon-e916f9786dd318ec873cab21c8092d4da2c8dd54.tar.lz
dexon-e916f9786dd318ec873cab21c8092d4da2c8dd54.tar.xz
dexon-e916f9786dd318ec873cab21c8092d4da2c8dd54.tar.zst
dexon-e916f9786dd318ec873cab21c8092d4da2c8dd54.zip
Merge pull request #17087 from OpenCommunityCoin/build/portable-shell
build: make build/goimports.sh more potable
-rwxr-xr-xbuild/goimports.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/build/goimports.sh b/build/goimports.sh
index 6d67ef1f0..1fcace6a4 100755
--- a/build/goimports.sh
+++ b/build/goimports.sh
@@ -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; \ No newline at end of file
+GOFMT="gofmt -s -w"
+GOIMPORTS="goimports -w"
+find_files | xargs $GOFMT
+find_files | xargs $GOIMPORTS