From 909e968ebb733dc01150e4e67221fef1177b0c8c Mon Sep 17 00:00:00 2001 From: hackyminer Date: Tue, 26 Jun 2018 22:04:27 +0900 Subject: [PATCH] build: make build/goimports.sh more potable --- build/goimports.sh | 22 +++++++++++----------- 1 file 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