blob: 1c1454616d71627828f447be5aeeb361b0884315 [file] [log] [blame]
Thomas Vachuska52e65802014-12-08 09:26:01 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Remotely pushes bits to a remote node in preparation for install.
4# -----------------------------------------------------------------------------
5
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9node=${1:-$OCI}
10remote=$ONOS_USER@$node
11
12locHash=$(cksum $ONOS_TAR | cut -d' ' -f1,2)
13remHash=$(ssh $remote cksum $ONOS_TAR | cut -d' ' -f1,2)
14
15if [ "$locHash" = "$remHash" ]; then
16 echo "ONOS bits $ONOS_TAR already up-to-date on $node..."
17else
18 scp -q $ONOS_TAR $remote:/tmp
19fi