summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
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