1
0
Fork 0
mirror of synced 2024-05-28 21:11:13 -04:00
openvpn-user/build_arm.sh
2021-10-21 09:56:29 +03:00

11 lines
446 B
Bash
Executable file

#!/usr/bin/env bash
if [[ "$GOOS" == "linux" ]]; then
if [[ "$GOARCH" == "arm" ]]; then
CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -ldflags "-linkmode external -extldflags -static -s -w" -o openvpn-user-arm
fi
if [[ "$GOARCH" == "arm64" ]]; then
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-linkmode external -extldflags -static -s -w" -o openvpn-user-arm64
fi
fi