blob: ece440950889b8c2793a0689cae26460554e04b8 [file] [log] [blame]
Thomas Vachuska8c9ee812015-11-24 17:29:37 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Assembles together all bundles required to run ONOS off-line.
4# -----------------------------------------------------------------------------
5
6mkdir -p target
7
8features=target/features-list.xml
9repos=target/staged-repos.xml
10
11echo "<features>" > $repos
12echo " <repository>mvn:org.onosproject/onos-features/1.4.0-SNAPSHOT/xml/features</repository>" >> $repos
13
14# Find all app feature files
15find $ONOS_ROOT -name '*-features.xml' | grep -v features-repo > $features
16
17# Produce repository entry for each file
18cat $features | while read feature; do
19 echo " <repository>file:$feature</repository>" >> $repos
20done
21
22# Create a synthetic feature that depends on all other ONOS features
23echo " <feature name=\"foo\">" >> $repos
24grep "feature name=" $ONOS_ROOT/features/features.xml | cut -d\" -f2 | while read f; do
25 echo " <feature>$f</feature>" >> $repos
26done
27
28cat $features | while read feature; do
29 grep "feature name=" $feature | cut -d\" -f2 | while read f; do
30 echo " <feature>$f</feature>" >> $repos
31 done
32done
33echo " </feature>" >> $repos
34
35echo "</features>" >> $repos