diff --git a/src/build.sh b/src/build.sh index 67801e6..e87e1eb 100644 --- a/src/build.sh +++ b/src/build.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash set -euo pipefail -x mkdir -p "$PREFIX"/bin + +# envdir cp -v "$SRC_DIR"/envdir "$PREFIX"/bin/envdir + +# Nextclade v3 +curl -fsSL -o "$PREFIX"/bin/nextclade3 https://github.com/nextstrain/nextclade/releases/download/3.0.0-alpha.1/nextclade-$("$SRC_DIR"/target-triple) +chmod a+rx "$PREFIX"/bin/nextclade3 diff --git a/src/target-triple b/src/target-triple new file mode 100755 index 0000000..15f10e0 --- /dev/null +++ b/src/target-triple @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Get the target triple from uname. +# +set -euo pipefail + +kernel="$(uname -s)" +machine="$(uname -m)" + +case "$kernel/$machine" in + Linux/x86_64) + echo "x86_64-unknown-linux-gnu";; + + Darwin/x86_64) + echo "x86_64-apple-darwin";; + + Darwin/arm64) + echo "aarch64-apple-darwin";; + + *) + echo "unsupported kernel/machine: $kernel/$machine" >&2 + exit 1;; +esac