blob: 6f6422a91eecff7d82a88af7e27f8463f9e23645 [file] [log] [blame]
Brian O'Connorb76fe172014-10-10 16:15:21 -07001#!/bin/bash
Pavlin Radoslavov91413792014-10-15 11:00:32 -07002# -----------------------------------------------------------------------------
Brian O'Connorb76fe172014-10-10 16:15:21 -07003# Update bundle on locally running karaf.
Pavlin Radoslavov91413792014-10-15 11:00:32 -07004# -----------------------------------------------------------------------------
Brian O'Connorb76fe172014-10-10 16:15:21 -07005
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9cd ~/.m2/repository
10jar=$(find org/onlab -type f -name '*.jar' | grep -e $1 | grep -v -e -tests | head -n 1)
11
12[ -z "$jar" ] && echo "No bundle $1 found for" && exit 1
13
14bundle=$(echo $(basename $jar .jar) | sed 's/-[0-9].*//g')
15
16client "bundle:update -f $bundle" 2>/dev/null