16b5be8c4e4fed7a9e99694cd7a83f61f0983119
[sdnc/core.git] / dblib / installer / src / main / resources / scripts / install-feature.sh
1 #!/bin/bash
2
3 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
4 ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
5 ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
6 INSTALLERDIR=$(dirname $0)
7
8 REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
9
10 if [ -f ${REPOZIP} ]
11 then
12         unzip -d ${ODL_HOME} ${REPOZIP}
13 else
14         echo "ERROR : repo zip ($REPOZIP) not found"
15         exit 1
16 fi
17
18 ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
19 ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}