blob: 9e9e08bb8a30bd4e5e69c0520e2aabe07d3a30b1 [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
Brian O'Connorabafb502014-12-02 22:26:20 -080010jar=$(find org/onosproject -type f -name '*.jar' | grep -e $1 | grep -v -e -tests | head -n 1)
Brian O'Connorb76fe172014-10-10 16:15:21 -070011
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