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