forked from kougazhang/go-zero-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
etcd.sh
16 lines (12 loc) · 754 Bytes
/
etcd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ETCD_VER=v3.4.15
GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
DOWNLOAD_URL=${GITHUB_URL}
ETCD_PATH=~/ectd
mkdir $ETCD_PATH
rm -f ${ETCD_PATH}/etcd-${ETCD_VER}-darwin-amd64.zip
rm -rf ${ETCD_PATH}/etcd-download-test && mkdir -p ${ETCD_PATH}/etcd-download-test
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o ${ETCD_PATH}/etcd-${ETCD_VER}-darwin-amd64.zip
unzip ${ETCD_PATH}/etcd-${ETCD_VER}-darwin-amd64.zip -d ${ETCD_PATH} && rm -f ${ETCD_PATH}/etcd-${ETCD_VER}-darwin-amd64.zip
mv ${ETCD_PATH}/etcd-${ETCD_VER}-darwin-amd64/* ${ETCD_PATH}/etcd-download-test && rm -rf mv ${ETCD_PATH}/etcd-${ETCD_VER}-darwin-amd64
${ETCD_PATH}/etcd-download-test/etcd --version
${ETCD_PATH}/etcd-download-test/etcdctl version