c258a0fedd
This PR groups misc cleanup and changes from https://github.com/ooni/probe-cli/pull/331. * CLI/linux/build: add documentation * debian/.gitignore: ignore generated files * debian/TODO: unnecessary at this point * debian/ooniprobe-cli.service: remove commented out lines * debian/rules: remove unnecessary actions * make: reindent and fix spelling * smoketest.sh: don't run in verbose mode Part of https://github.com/ooni/probe/issues/1466
16 lines
497 B
Bash
Executable File
16 lines
497 B
Bash
Executable File
#!/bin/sh
|
|
# This script is executed by `./make` when building inside
|
|
# an Alpine Linux docker container. Using Alpine Linux, which
|
|
# uses musl libc, allows us to emit static binaries.
|
|
set -e
|
|
if [ "$GOARCH" = "" ]; then
|
|
echo 'fatal: $GOARCH is not set' 1>&2
|
|
exit 1
|
|
fi
|
|
set -x
|
|
apk update
|
|
apk upgrade
|
|
apk add --no-progress gcc git linux-headers musl-dev
|
|
CGO_ENABLED=1 GOOS=linux GOARCH=$GOARCH go build -o ./CLI/linux/$GOARCH/ \
|
|
-ldflags='-s -w -extldflags "-static"' "$@" ./cmd/ooniprobe
|