summaryrefslogtreecommitdiffstats
path: root/debian/schema/compare-schema
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:23:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:23:54 +0000
commitfe2751bf1e0388ddfa3fdfa88ed70b2bc94e2173 (patch)
tree5f743c2fcc2c85b0363602a14ac3753bc5a19abc /debian/schema/compare-schema
parentAdding upstream version 2.4.47+dfsg. (diff)
downloadopenldap-fe2751bf1e0388ddfa3fdfa88ed70b2bc94e2173.tar.xz
openldap-fe2751bf1e0388ddfa3fdfa88ed70b2bc94e2173.zip
Adding debian version 2.4.47+dfsg-3+deb10u7.debian/2.4.47+dfsg-3+deb10u7debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/schema/compare-schema')
-rwxr-xr-xdebian/schema/compare-schema26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/schema/compare-schema b/debian/schema/compare-schema
new file mode 100755
index 0000000..ce6b80c
--- /dev/null
+++ b/debian/schema/compare-schema
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Compare the stripped versions of the schema with the unmodified versions
+# from the source as distributed upstream and find any non-comment changes
+# so that our stripped versions can be updated.
+#
+# Takes the directory containing our stripped schema and the directory
+# containing the upstream schema. Uses the first directory as a working
+# area.
+
+set -e
+
+ours="$1"
+theirs="$2"
+if [ -z "$ours" ] || [ -z "$theirs" ] ; then
+ echo 'Usage: compare-schema <debian-schema-dir> <openldap-schema-dir>' >&2
+ exit 1
+fi
+
+cd $ours
+for schema in *.schema *.ldif ; do
+ grep -v '^#' "$schema" | grep -v '^ *$' > "${schema}.debian"
+ grep -v '^#' "$theirs/$schema" | grep -v '^ *$' > "${schema}.upstream"
+ diff -u "${schema}.debian" "${schema}.upstream"
+ rm "${schema}.debian" "${schema}.upstream"
+done