Build script - Build for x86 and amd64

This commit is contained in:
Emmanuel BENOîT 2021-02-19 13:55:27 +01:00
parent 97f0cf48bb
commit ffe98f702b

View file

@ -2,10 +2,13 @@
set -e
cd "$(dirname $0)"
mkdir -p bin
for d in $(find cmd -mindepth 1 -maxdepth 1 -type d); do
cd $d
for arch in 386 amd64; do
mkdir -p bin/$arch
for d in $(find cmd -mindepth 1 -maxdepth 1 -type d); do
pushd $d >/dev/null
xn="$(basename "$d")"
go build
/bin/mv "$xn" ../../bin
GOARCH=$arch go build
/bin/mv "$xn" ../../bin/$arch
popd >/dev/null
done
done