From a334c468508125b9a8342b285f81561d8ad026e1 Mon Sep 17 00:00:00 2001 From: Jean-Tiare LE BIGOT Date: Tue, 7 Aug 2012 22:23:38 -0400 Subject: Tool to ease rdb file update to work on fdo#46808 Add a simple shell script to ease the regeneration of types.rdb. This is a bit tricky to do and error prone. I hope it will encourage people to work on fdo#46808. Signed-off-by: Stephan Bergmann with additional changes: * Moved offapi/update-rdb.sh to offapi/type_reference/update-rdb.sh, to make clear that it is all about offapi/type_reference only. * Changed update-rdb.sh to take a list of idl files, so that a single instance of the script works for both offapi and udkapi. * Some more simplifications/clean up of update-rdb.sh. * Removed the udkapi/update-rdb.sh symlink (to avoid potential problems with symlinks checked into the git repo, like on Windows). * Undid accidental(?) changes to typelibrary_history.txt, added a note about update-rdb.sh. Change-Id: Ic1923e2b2b3af64251019b619b33c728a05b4a14 --- offapi/type_reference/typelibrary_history.txt | 2 +- offapi/type_reference/update-rdb.sh | 32 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 offapi/type_reference/update-rdb.sh (limited to 'offapi') diff --git a/offapi/type_reference/typelibrary_history.txt b/offapi/type_reference/typelibrary_history.txt index 0f7c616777a5..2fab53b4a378 100644 --- a/offapi/type_reference/typelibrary_history.txt +++ b/offapi/type_reference/typelibrary_history.txt @@ -1,5 +1,5 @@ Example of updating an incompatibly-changed type (com.sun.star.script.Converter, -in this example) in the accompanying types.rdb: +in this example) in the accompanying types.rdb (see also update-rdb.sh): .../core> mkdir tmp .../core> LD_LIBRARY_PATH=.../core/solver/unxlngx6/lib \ diff --git a/offapi/type_reference/update-rdb.sh b/offapi/type_reference/update-rdb.sh new file mode 100755 index 000000000000..18ddc21412cd --- /dev/null +++ b/offapi/type_reference/update-rdb.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Basic argument checks +if [ $# -lt 1 ] +then + echo "usage:" + echo " $0 " + echo "" + echo "example:" + echo " $0 \\" + echo " offapi/com/sun/star/auth/SSOManagerFactory.idl \\" + echo " offapi/com/sun/star/auth/SSOPasswordCache.idl" + exit 1 +fi + +# Load env vars +source "$(dirname "$0")"/../../config_host.mk 2>/dev/null + +set -e +mkdir tmp +for i in "$@"; do + "${OUTDIR_FOR_BUILD?}"/bin/regmerge tmp/out1.rdb /UCR \ + "${WORKDIR_FOR_BUILD?}"/UnoApiPartTarget/"${i%.idl}".urd +done +"${OUTDIR_FOR_BUILD?}"/bin/regmerge tmp/out2.rdb / \ + "${SRC_ROOT?}"/offapi/type_reference/types.rdb tmp/out1.rdb +echo "sanity check diff:" +diff <("${OUTDIR_FOR_BUILD?}"/bin/regview \ + "${SRC_ROOT?}"/offapi/type_reference/types.rdb) \ + <("${OUTDIR_FOR_BUILD?}"/bin/regview tmp/out2.rdb) && $? -le 1 +mv tmp/out2.rdb "${SRC_ROOT?}"/offapi/type_reference/types.rdb +rm -r tmp -- cgit