blob: 0523886d3f28f049d92842a1dd24e2bd69941b30 [file] [log] [blame]
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -07001#!/bin/bash
alshabib7db13562017-01-09 21:21:34 -08002
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -07003for app in $APPS; do
4 echo "Installing application '$app'"
5 oar=$(find $BUILD_ROOT -path "*/target/*" -name "$app*".oar)
6 if [ "$oar x" == " x" ]; then
7 echo "Required application, $app, not found."
8 continue
9 fi
10 rm -rf $APP_INSTALL_ROOT
11 mkdir -p $APP_INSTALL_ROOT
12 cd $APP_INSTALL_ROOT
13 cp $oar $APP_INSTALL_ROOT
14 jar -xf $APP_INSTALL_ROOT/$(basename $oar)
15 name=$(grep "name=" $APP_INSTALL_ROOT/app.xml | sed 's/<app name="//g;s/".*//g')
16 mkdir -p $APPS_ROOT/$name
17 cp $APP_INSTALL_ROOT/app.xml $APPS_ROOT/$name/app.xml
18 touch $APPS_ROOT/$name/active
19 [ -f $APP_INSTALL_ROOT/app.png ] && cp $APP_INSTALL_ROOT/app.png $APPS_ROOT/$name/app.png
20 cp $APP_INSTALL_ROOT/$(basename $oar) $APPS_ROOT/$name/$name.oar
21 cp -rf $APP_INSTALL_ROOT/m2/* $KARAF_M2
22 rm -rf $APP_INSTALL_ROOT
alshabib7db13562017-01-09 21:21:34 -080023done