Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Remotely pushes routing scripts a remote mininet test machine. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 7 | . $ONOS_ROOT/tools/build/envDefaults |
| 8 | |
| 9 | routing="${ONOS_ROUTING:-}" |
| 10 | routing_root="${ONOS_ROUTING:-}" |
| 11 | |
| 12 | if [ -z "$routing_root" ]; then |
| 13 | routing_root=$(mktemp -d /tmp/routing.XXXXX) |
| 14 | ( cd $routing_root && git init && git clone https://gerrit.onosproject.org/routing ) |
| 15 | routing=$routing_root/routing |
| 16 | fi |
| 17 | |
| 18 | [ ! -d "$routing" ] && echo "routing source tree not found" >&2 && exit 1 |
| 19 | |
| 20 | node=${1:-$OCN} |
| 21 | |
| 22 | ssh $ONOS_USER@$node sudo rm -rf routing |
DongRyeol Cha | 5c0a9f0 | 2018-05-17 14:32:55 +0900 | [diff] [blame] | 23 | scp -qr $routing $ONOS_USER@[$node]: |
Ray Milkey | 922db30 | 2018-04-02 08:54:51 -0700 | [diff] [blame] | 24 | |
| 25 | echo "@stc routing_root=$routing_root" |
| 26 | echo "@stc routing=$routing" |