aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2015-12-08 09:33:34 +0100
committerJakob Borg <jakob@nym.se>2015-12-08 09:33:34 +0100
commitded09251551fc61b4f6150571a9bb918e9592003 (patch)
treecb58bb60632f0220f30b64429bcfbdee7d440cc0 /build.sh
parent931408037c17233a636dabd5eaa476de1691b4b6 (diff)
downloadsyncthing-ded09251551fc61b4f6150571a9bb918e9592003.tar.gz
syncthing-ded09251551fc61b4f6150571a9bb918e9592003.zip
Neater build.sh all
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh33
1 files changed, 16 insertions, 17 deletions
diff --git a/build.sh b/build.sh
index ddbf2e95a..c84daacd1 100755
--- a/build.sh
+++ b/build.sh
@@ -74,27 +74,26 @@ case "${1:-default}" in
;;
all)
- build -goos darwin -goarch amd64 tar
+ platforms=(
+ darwin-amd64 dragonfly-amd64 freebsd-amd64 linux-amd64 netbsd-amd64 openbsd-amd64 solaris-amd64 windows-amd64
+ freebsd-386 linux-386 netbsd-386 openbsd-386 windows-386
+ linux-arm
+ )
- build -goos dragonfly -goarch amd64 tar
+ for plat in "${platforms[@]}"; do
+ echo Building "$plat"
- build -goos freebsd -goarch 386 tar
- build -goos freebsd -goarch amd64 tar
+ goos="${plat%-*}"
+ goarch="${plat#*-}"
+ dist="tar"
- build -goos linux -goarch 386 tar
- build -goos linux -goarch amd64 tar
- build -goos linux -goarch arm tar
-
- build -goos netbsd -goarch 386 tar
- build -goos netbsd -goarch amd64 tar
-
- build -goos openbsd -goarch 386 tar
- build -goos openbsd -goarch amd64 tar
-
- build -goos solaris -goarch amd64 tar
+ if [[ $goos == "windows" ]]; then
+ dist="zip"
+ fi
- build -goos windows -goarch 386 zip
- build -goos windows -goarch amd64 zip
+ build -goos "$goos" -goarch "$goarch" "$dist"
+ echo
+ done
;;
test-cov)