16 lines
344 B
Bash
Executable File
16 lines
344 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
cd "$(dirname "$0")/.."
|
|
mkdir -p dist
|
|
|
|
GOOS="${GOOS:-linux}"
|
|
GOARCH="${GOARCH:-amd64}"
|
|
CGO_ENABLED=0 GOOS="$GOOS" GOARCH="$GOARCH" go build \
|
|
-trimpath \
|
|
-ldflags="-s -w" \
|
|
-o "dist/rtorrent-scgi-proxy-${GOOS}-${GOARCH}" \
|
|
./cmd/rtorrent-scgi-proxy
|
|
|
|
printf '%s\n' "dist/rtorrent-scgi-proxy-${GOOS}-${GOARCH}"
|