summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorJean-Tiare LE BIGOT <admin@jtlebi.fr>2012-08-07 22:23:38 -0400
committerStephan Bergmann <sbergman@redhat.com>2012-08-14 14:41:02 +0200
commita334c468508125b9a8342b285f81561d8ad026e1 (patch)
treeb8f6ec1d98f695faff04f546438fd80ca0015cd7 /offapi
parentb8b054785b9718f0ec08f92b0c53cac7a497b189 (diff)
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 <sbergman@redhat.com> 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
Diffstat (limited to 'offapi')
-rw-r--r--offapi/type_reference/typelibrary_history.txt2
-rwxr-xr-xoffapi/type_reference/update-rdb.sh32
2 files changed, 33 insertions, 1 deletions
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 <idl file list>"
+ 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