From 2e212e93b3f441eeb91c115605184e9fc8905cf1 Mon Sep 17 00:00:00 2001 From: Jordan Halterman Date: Tue, 30 Oct 2018 12:11:36 -0700 Subject: [PATCH] Avoid unnecessary download of Atomix bits for full releases Change-Id: Ic85de970f0a2ad242b437310387b4e92d334b90b --- tools/test/bin/atomix-install | 4 ++-- tools/test/bin/atomix-push-bits | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/test/bin/atomix-install b/tools/test/bin/atomix-install index a076d00d47..b059e12d0f 100755 --- a/tools/test/bin/atomix-install +++ b/tools/test/bin/atomix-install @@ -26,8 +26,6 @@ _EOF_ [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 . $ONOS_ROOT/tools/build/envDefaults -onos-check-bits - while getopts fnvm: o; do case "$o" in f) uninstall=true;; @@ -43,6 +41,8 @@ shift $OPC node=${1:-$OCI} remote=$ONOS_USER@$node +$(dirname $0)/atomix-push-bits $node + ssh -tt $remote " [ -f $ATOMIX_INSTALL_DIR/bin/atomix-agent ] && echo \"Atomix is already installed\" && exit 1 diff --git a/tools/test/bin/atomix-push-bits b/tools/test/bin/atomix-push-bits index 24fc9b77da..ffeaf2ef33 100755 --- a/tools/test/bin/atomix-push-bits +++ b/tools/test/bin/atomix-push-bits @@ -41,13 +41,14 @@ SSH_OPTIONS=" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ if [ ! -z "$ATOMIX_ROOT" ]; then echo "Pushing to $node from $ATOMIX_ROOT" ATOMIX_TAR=$ATOMIX_ROOT/dist/target/atomix.tar.gz -elif [ -e $ATOMIX_MAVEN ]; then +elif [ -e "$ATOMIX_MAVEN" ]; then echo "Pushing to $node from $ATOMIX_MAVEN" ATOMIX_TAR=$ATOMIX_MAVEN else echo "Pushing to $node from $ATOMIX_LOCAL" - rm -f $ATOMIX_LOCAL - wget -O $ATOMIX_LOCAL $ATOMIX_REMOTE + if [ ! -f "$ATOMIX_LOCAL" ]; then + wget -O $ATOMIX_LOCAL $ATOMIX_REMOTE + fi ATOMIX_TAR=$ATOMIX_LOCAL fi