]> ruderich.org/simon Gitweb - safcm/safcm.git/blob - cmd/safcm-remote/build.sh
Use SPDX license identifiers
[safcm/safcm.git] / cmd / safcm-remote / build.sh
1 #!/bin/sh
2
3 # Build remote helpers for all operating systems and architectures which are
4 # supported as target hosts
5
6 # SPDX-License-Identifier: GPL-3.0-or-later
7 # Copyright (C) 2021-2024  Simon Ruderich
8
9 set -eu
10
11
12 build() {
13     GOOS="$1" GOARCH="$2" go build -o "$dest/$1-$2"
14 }
15
16 build_arm() {
17     GOOS="$1" GOARCH="$2" GOARM="$3" go build -o "$dest/$1-${2}v${3}l"
18 }
19
20
21 dest=../safcm/remote
22
23 mkdir -p "$dest"
24
25 build freebsd amd64
26 build linux amd64
27 build openbsd amd64
28 build_arm linux arm 7
29 # TODO: support more operating systems and architectures