d4820f6eeb
Change-Id: Ic71b40d59c31e695448f46df00f2bc03479f075d Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
35 lines
771 B
Bash
Executable File
35 lines
771 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Invoked by run-tests.sh
|
|
|
|
set -eux
|
|
if [ -z "$(which etcd)" ]; then
|
|
ETCD_VERSION=${ETCD_VERSION:-3.5.21}
|
|
case `uname -s` in
|
|
Darwin)
|
|
OS=darwin
|
|
SUFFIX=zip
|
|
;;
|
|
Linux)
|
|
OS=linux
|
|
SUFFIX=tar.gz
|
|
;;
|
|
*)
|
|
echo "Unsupported OS"
|
|
exit 1
|
|
esac
|
|
case `uname -m` in
|
|
x86_64)
|
|
MACHINE=amd64
|
|
;;
|
|
*)
|
|
echo "Unsupported machine"
|
|
exit 1
|
|
esac
|
|
TARBALL_NAME=etcd-v${ETCD_VERSION}-$OS-$MACHINE
|
|
test ! -d "$TARBALL_NAME" && curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${TARBALL_NAME}.${SUFFIX} | tar xz
|
|
export PATH=$PATH:$TARBALL_NAME
|
|
fi
|
|
|
|
$*
|