blob: 8c9276fc30c3ab08927d28b6cb4e7f708535f1ff [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)
Jonathan Hart520f2272015-01-15 16:06:32 -080013remHash=$(ssh $remote cksum $ONOS_TAR 2>/dev/null | cut -d' ' -f1,2)
Thomas Vachuska52e65802014-12-08 09:26:01 -080014
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