diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/fetch-nym-binaries.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/fetch-nym-binaries.sh b/scripts/fetch-nym-binaries.sh new file mode 100755 index 0000000..ff8f7b6 --- /dev/null +++ b/scripts/fetch-nym-binaries.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# Fetch the nym-client binary required for the embedded build. +# The binary is not committed to keep the repository small. +# +# Target: nym-client v1.1.76 (linux/amd64), the version NymDrop is tested with. +set -euo pipefail + +VERSION="v1.1.76" +URL="https://github.com/nymtech/nym/releases/download/nym-binaries-${VERSION}/nym-client" +DEST_DIRS=( + "cmd/nymdrop/bin" + "cmd/nymdrop-reader/bin" +) + +root="$(cd "$(dirname "$0")/.." && pwd)" +tmp="$(mktemp)" +echo "Downloading nym-client ${VERSION} ..." +curl -fL "$URL" -o "$tmp" +chmod +x "$tmp" + +for d in "${DEST_DIRS[@]}"; do + mkdir -p "$root/$d" + cp "$tmp" "$root/$d/nym-client-linux-amd64" + echo " installed -> $d/nym-client-linux-amd64" +done +rm -f "$tmp" +echo "Done. You can now run: go build ./cmd/nymdrop/ && go build ./cmd/nymdrop-reader/" |
