blob: e33a4119e4a1f49b5d20992b660216960b19326f [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. Bainbridgeb6f72c12017-08-22 13:22:23 -07004OARS=$(find $DOWNLOAD_ROOT -name "*.oar")
5for oar in $OARS; do
David K. Bainbridgef87a5c82017-08-11 11:04:57 -07006 cd $HERE
David K. Bainbridgeb6f72c12017-08-22 13:22:23 -07007 echo "Installing application '$oar'"
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -07008 rm -rf $APP_INSTALL_ROOT
9 mkdir -p $APP_INSTALL_ROOT
10 cd $APP_INSTALL_ROOT
11 cp $oar $APP_INSTALL_ROOT
David K. Bainbridge6c0dc882017-08-17 09:57:10 -070012 unzip -oq -d . $APP_INSTALL_ROOT/$(basename $oar)
David K. Bainbridge9f2ec3c2017-08-10 09:13:18 -070013 name=$(grep "name=" $APP_INSTALL_ROOT/app.xml | sed 's/<app name="//g;s/".*//g')
14 mkdir -p $APPS_ROOT/$name
15 cp $APP_INSTALL_ROOT/app.xml $APPS_ROOT/$name/app.xml
16 touch $APPS_ROOT/$name/active
17 [ -f $APP_INSTALL_ROOT/app.png ] && cp $APP_INSTALL_ROOT/app.png $APPS_ROOT/$name/app.png
18 cp $APP_INSTALL_ROOT/$(basename $oar) $APPS_ROOT/$name/$name.oar
19 cp -rf $APP_INSTALL_ROOT/m2/* $KARAF_M2
20 rm -rf $APP_INSTALL_ROOT
alshabib7db13562017-01-09 21:21:34 -080021done