fix sh error.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-03-28 15:57:20 +08:00
parent ae65bbf8e1
commit 97b381b748
1 changed files with 7 additions and 5 deletions

View File

@ -1,10 +1,12 @@
#!/bin/sh
for GOOS in darwin linux windows; do
for GOARCH in 386 amd64; do
OS="darwin linux windows"
ARCH="amd64"
for GOOS in $OS; do
for GOARCH in $ARCH; do
EXE="gopush"
if [ $GOOS == "windows" ]; then
EXE="gopush.exe"
fi
(test "$GOOS" = "windows") && EXE="gopush.exe"
echo "Build: ${GOOS}, Arch: ${GOARCH}, EXE: ${EXE}"
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/${EXE} gopush.go;