bump product version to 4.1.6.2
[LibreOffice.git] / offapi / type_reference / update-rdb.sh
blobcbe33b639b6eb4f07a8334370c789795aa838460
1 #!/bin/bash
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 set -e
12 # Basic argument checks
13 if [ $# -lt 2 ]
14 then
15 echo "usage:"
16 echo " make cmd cmd='$0 <rdb file> <idl file list>'"
17 echo ""
18 echo "example:"
19 echo " make cmd cmd='$0"
20 echo " offapi/type_reference/offapi.rdb"
21 echo " offapi/com/sun/star/auth/SSOManagerFactory.idl"
22 echo " offapi/com/sun/star/auth/SSOPasswordCache.idl'"
23 exit 1
26 rdb=${1?}
27 shift
28 mkdir tmp
29 for i in "$@"; do
30 "${OUTDIR_FOR_BUILD?}"/bin/regmerge -v tmp/out1.rdb /UCR \
31 "${WORKDIR_FOR_BUILD?}"/UnoApiPartTarget/"${i%.idl}".urd
32 done
33 "${OUTDIR_FOR_BUILD?}"/bin/regmerge -v tmp/out2.rdb / "${SRC_ROOT?}"/"${rdb?}" \
34 tmp/out1.rdb
35 echo "sanity check diff:"
36 diff <("${OUTDIR_FOR_BUILD?}"/bin/regview "${SRC_ROOT?}"/"${rdb?}") \
37 <("${OUTDIR_FOR_BUILD?}"/bin/regview tmp/out2.rdb) && $? -le 1
38 mv tmp/out2.rdb "${SRC_ROOT?}"/"${rdb?}"
39 rm -r tmp