Change default maven path in brmsgw container
[oom.git] / kubernetes / policy / charts / brmsgw / resources / config / pe / brmsgw-tweaks.sh
1 # Copyright © 2017 Amdocs, Bell Canada, AT&T
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #! /bin/bash
16
17 PROPS_BUILD="${POLICY_HOME}/etc/build.info"
18
19 PROPS_RUNTIME="${POLICY_HOME}/servers/brmsgw/config.properties"
20 PROPS_INSTALL="${POLICY_HOME}/install/servers/brmsgw/config.properties"
21
22
23 if [ ! -f "${PROPS_BUILD}" ]; then
24         echo "error: version information does not exist: ${PROPS_BUILD}"
25         exit 1
26 fi
27
28 source "${POLICY_HOME}/etc/build.info"
29
30 if [ -z "${version}" ]; then
31         echo "error: no version information present"
32         exit 1
33 fi
34
35 for CONFIG in ${PROPS_RUNTIME} ${PROPS_INSTALL}; do
36         if [ ! -f "${CONFIG}" ]; then
37                 echo "warning: configuration does not exist: ${CONFIG}"
38         else
39                 sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}"
40         fi
41 done