Thomas Vachuska

Making onos-package more selective to curb the size of the distributable.

Change-Id: I241adc1f4dc18b4ffcc851eed2fddcabfbdc51df

Change-Id: I9ec0db0a01d2f156b393d0ee2be3297e1714d7ba
...@@ -51,12 +51,12 @@ sed "s/\$KARAF_VERSION/$KARAF_VERSION/g" \ ...@@ -51,12 +51,12 @@ sed "s/\$KARAF_VERSION/$KARAF_VERSION/g" \
51 51
52 # Stage the ONOS bundles, but only those that match the version 52 # Stage the ONOS bundles, but only those that match the version
53 mkdir -p $ONOS_STAGE/$KARAF_DIST/system/org/onosproject 53 mkdir -p $ONOS_STAGE/$KARAF_DIST/system/org/onosproject
54 -find $M2_REPO/org/onosproject/ -type d -name $ONOS_POM_VERSION | while read line; do 54 +find $M2_REPO/org/onosproject -type f -path "*/$ONOS_POM_VERSION/*" \
55 - path=${line#*/onosproject/} 55 + -name '*.jar' -o -name '*.pom' -o -name 'features.xml' \
56 - artifact=${path%/$ONOS_POM_VERSION} 56 + | grep -v -e '-tests.jar' | while read src; do
57 - mkdir -p $ONOS_STAGE/$KARAF_DIST/system/org/onosproject/$artifact 57 + dst=$ONOS_STAGE/$KARAF_DIST/system/${src#$M2_REPO/*}
58 - cp -r $M2_REPO/org/onosproject/$artifact/$ONOS_POM_VERSION \ 58 + mkdir -p $(dirname $dst)
59 - $ONOS_STAGE/$KARAF_DIST/system/org/onosproject/$artifact/$ONOS_POM_VERSION 59 + cp $src $dst
60 done 60 done
61 61
62 # ONOS Patching ---------------------------------------------------------------- 62 # ONOS Patching ----------------------------------------------------------------
...@@ -82,5 +82,5 @@ cd $ONOS_STAGE_ROOT ...@@ -82,5 +82,5 @@ cd $ONOS_STAGE_ROOT
82 rm -f $ONOS_TAR $ONOS_ZIP 82 rm -f $ONOS_TAR $ONOS_ZIP
83 COPYFILE_DISABLE=1 tar zcf $ONOS_TAR $ONOS_BITS 83 COPYFILE_DISABLE=1 tar zcf $ONOS_TAR $ONOS_BITS
84 which zip >/dev/null && zip -rq $ONOS_ZIP $ONOS_BITS 84 which zip >/dev/null && zip -rq $ONOS_ZIP $ONOS_BITS
85 -ls -l $ONOS_TAR $ONOS_ZIP 2>/dev/null 85 +which zip >/dev/null && ls -l $ONOS_TAR $ONOS_ZIP || ls -l $ONOS_TAR
86 rm -r $ONOS_STAGE 86 rm -r $ONOS_STAGE
......