24 lines
539 B
Bash
Executable File
24 lines
539 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# build amd64 and arm64 versions of dropshell, to:
|
|
# build/dropshell.amd64
|
|
# build/dropshell.arm64
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
OUTPUT_DIR="$SCRIPT_DIR/output"
|
|
DOCKERFILE="$SCRIPT_DIR/Dockerfile.multiarch"
|
|
|
|
mkdir -p "$OUTPUT_DIR"
|
|
|
|
options="-Doptimize=ReleaseSafe -Dtarget=x86_64-linux-musl"
|
|
docker build \
|
|
--platform "linux/amd64" \
|
|
--build-arg "OPTIONS=$options" \
|
|
-f Dockerfile.multiarch \
|
|
-t dropshell-build .
|
|
|
|
|
|
echo "Builds complete:"
|
|
ls -lh "$OUTPUT_DIR"/dropshell.* |