etcd/scripts/install-marker.sh
Wei Fu 1fcb782780 chore: introduce strict bash mode for scripts,.github
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-22 18:00:41 +08:00

22 lines
559 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ARCH=${1:-}
if [ -z "$ARCH" ]; then
echo "Usage: ${0} [amd64 or darwin], defaulting to 'amd64'" >> /dev/stderr
ARCH=amd64
fi
MARKER_URL="https://storage.googleapis.com/etcd/test-binaries/marker-v0.4.0-x86_64-unknown-linux-gnu"
if [ "${ARCH}" == "darwin" ]; then
MARKER_URL="https://storage.googleapis.com/etcd/test-binaries/marker-v0.4.0-x86_64-apple-darwin"
fi
echo "Installing marker"
curl -L "${MARKER_URL}" -o "${GOPATH}"/bin/marker
chmod 755 "${GOPATH}"/bin/marker
"${GOPATH}"/bin/marker --version