From 599ecfbd4c71de5f71663b1cadf2700b31a84ec2 Mon Sep 17 00:00:00 2001 From: TommyLike Date: Tue, 20 Jun 2017 11:32:25 +0800 Subject: [PATCH] Download etcd3 only zip file not exists Give a change to manually prepare the zip file for etcd. Change-Id: I54283cf2ed62bb716af34df21e8c168014264c8c --- lib/etcd3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/etcd3 b/lib/etcd3 index ea58403b24..0e1fbd5bc2 100644 --- a/lib/etcd3 +++ b/lib/etcd3 @@ -115,7 +115,9 @@ function install_etcd3 { # Download and cache the etcd tgz for subsequent use if [ ! -f "$FILES/etcd-$ETCD_VERSION-linux-$ETCD_ARCH/etcd" ]; then ETCD_DOWNLOAD_FILE=$ETCD_NAME.tar.gz - wget $ETCD_DOWNLOAD_URL/$ETCD_VERSION/$ETCD_DOWNLOAD_FILE -O $FILES/$ETCD_DOWNLOAD_FILE + if [ ! -f "$FILES/$ETCD_DOWNLOAD_FILE" ]; then + wget $ETCD_DOWNLOAD_URL/$ETCD_VERSION/$ETCD_DOWNLOAD_FILE -O $FILES/$ETCD_DOWNLOAD_FILE + fi echo "${ETCD_SHA256} $FILES/${ETCD_DOWNLOAD_FILE}" > $FILES/etcd.sha256sum # NOTE(sdague): this should go fatal if this fails sha256sum -c $FILES/etcd.sha256sum