scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

commit a8c5f153f1d5d3e17a2af6f1bc2ba7e7f670b801
parent d7994230c4b9c686e196144efc7443174bd0db59
Author: gearsix <gearsix@tuta.io>
Date:   Sun, 28 Mar 2021 17:26:04 +0100

added gobuild

Diffstat:
Asrc/gobuild.sh | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/gobuild.sh b/src/gobuild.sh @@ -0,0 +1,17 @@ +name=$1 +src=$2 +arch=(amd64 386 arm) +os=(linux windows darwin dragonfly openbsd netbsd freebsd) + +for a in ${arch[@]}; do + for o in ${os[@]}; do + if [[ $a == "arm" || $a == "386" ]]; then + if [[ $o == "darwin" || $o == "dragonfly" ]]; then + continue + fi + fi + + echo "building $name-$a-$o" + GOARCH=$a GOOS=$o go build -o $name-$a-$o $src + done +done