Brian O'Connor | b76fe17 | 2014-10-10 16:15:21 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Pavlin Radoslavov | 9141379 | 2014-10-15 11:00:32 -0700 | [diff] [blame] | 2 | # ----------------------------------------------------------------------------- |
Brian O'Connor | b76fe17 | 2014-10-10 16:15:21 -0700 | [diff] [blame] | 3 | # Update bundle on locally running karaf. |
Pavlin Radoslavov | 9141379 | 2014-10-15 11:00:32 -0700 | [diff] [blame] | 4 | # ----------------------------------------------------------------------------- |
Brian O'Connor | b76fe17 | 2014-10-10 16:15:21 -0700 | [diff] [blame] | 5 | |
| 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 7 | . $ONOS_ROOT/tools/build/envDefaults |
| 8 | |
| 9 | cd ~/.m2/repository |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 10 | jar=$(find org/onosproject -type f -name '*.jar' | grep -e $1 | grep -v -e -tests | head -n 1) |
Brian O'Connor | b76fe17 | 2014-10-10 16:15:21 -0700 | [diff] [blame] | 11 | |
| 12 | [ -z "$jar" ] && echo "No bundle $1 found for" && exit 1 |
| 13 | |
| 14 | bundle=$(echo $(basename $jar .jar) | sed 's/-[0-9].*//g') |
| 15 | |
| 16 | client "bundle:update -f $bundle" 2>/dev/null |