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