Avoid unnecessary download of Atomix bits for full releases
Change-Id: Ic85de970f0a2ad242b437310387b4e92d334b90b
diff --git a/tools/test/bin/atomix-install b/tools/test/bin/atomix-install
index a076d00..b059e12 100755
--- a/tools/test/bin/atomix-install
+++ b/tools/test/bin/atomix-install
@@ -26,8 +26,6 @@
[ ! -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 @@
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 24fc9b7..ffeaf2e 100755
--- a/tools/test/bin/atomix-push-bits
+++ b/tools/test/bin/atomix-push-bits
@@ -41,13 +41,14 @@
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