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 set -e
cd "$(dirname $0)" cd "$(dirname $0)"
mkdir -p bin for arch in 386 amd64; do
for d in $(find cmd -mindepth 1 -maxdepth 1 -type d); do mkdir -p bin/$arch
cd $d for d in $(find cmd -mindepth 1 -maxdepth 1 -type d); do
pushd $d >/dev/null
xn="$(basename "$d")" xn="$(basename "$d")"
go build GOARCH=$arch go build
/bin/mv "$xn" ../../bin /bin/mv "$xn" ../../bin/$arch
popd >/dev/null
done
done done