blob: d318d4d1892338b3ed9778b14295bc9d1859905f [file] [log] [blame]
Pamela Dragoshd1728dc2017-02-14 19:57:17 -05001#! /bin/bash
2
jh173017722e72017-03-21 18:17:03 -05003PROPS_BUILD="${POLICY_HOME}/etc/build.info"
4
5PROPS_RUNTIME="${POLICY_HOME}/servers/brmsgw/config.properties"
6PROPS_INSTALL="${POLICY_HOME}/install/servers/brmsgw/config.properties"
7
8
9if [ ! -f "${PROPS_BUILD}" ]; then
10 echo "error: version information does not exist: ${PROPS_BUILD}"
11 exit 1
12fi
13
14source "${POLICY_HOME}/etc/build.info"
15
Jorge Hernandeza5b84f92017-06-23 19:05:14 -050016if [ -z "${version}" ]; then
17 echo "error: no version information present"
18 exit 1
19fi
20
jh173017722e72017-03-21 18:17:03 -050021for CONFIG in ${PROPS_RUNTIME} ${PROPS_INSTALL}; do
22 if [ ! -f "${CONFIG}" ]; then
23 echo "warning: configuration does not exist: ${CONFIG}"
24 else
Jorge Hernandeza5b84f92017-06-23 19:05:14 -050025 sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}"
26 fi
27done
28
29DEPS_JSON_RUNTIME="${POLICY_HOME}/servers/brmsgw/dependency.json"
30DEPS_JSON_INSTALL="${POLICY_HOME}/install/servers/brmsgw/dependency.json"
31
32for DEP in ${DEPS_JSON_RUNTIME} ${DEPS_JSON_INSTALL}; do
33 if [ ! -f "${DEP}" ]; then
34 echo "warning: configuration does not exist: ${DEP}"
35 else
36 sed -i -e "s/\"version\":.*/\"version\": \"${version}\"/g" "${DEP}"
jh173017722e72017-03-21 18:17:03 -050037 fi
38done