about summary refs log tree commit diff
path: root/tools/check-tree.sh
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2021-02-25 11:36:45 +0100
committerSebastien Bacher <seb128@ubuntu.com>2021-02-25 11:36:45 +0100
commitd92aa7f298fe84d4cf686c5ad64b73438e00d377 (patch)
tree2f1f4c7b48cff9e63b0d0e3669bada3d9aeda72e /tools/check-tree.sh
parenta82e048a943092315a32d745c99e0f5635e29134 (diff)
parent3a56bce6c0ea7ba0fe269520547740783b342e0d (diff)
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
Diffstat (limited to 'tools/check-tree.sh')
-rwxr-xr-xtools/check-tree.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/check-tree.sh b/tools/check-tree.sh
new file mode 100755
index 00000000..cff85c3e
--- /dev/null
+++ b/tools/check-tree.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+TOP_DIR="$(dirname "$0")/.."
+
+die() {
+    printf 'FAIL: %s\n' "$*" >&2
+    exit 1
+}
+
+check_cmp() {
+    local a="$1"
+    local b="$2"
+
+    cmp "$TOP_DIR/$a" "$TOP_DIR/$b" && return 0
+
+    diff "$TOP_DIR/$a" "$TOP_DIR/$b" || :
+    die "files \"$a\" and \"$b\" differ!"
+}
+
+check_cmp shared/nm-base/nm-ethtool-utils-base.h libnm/nm-ethtool-utils.h
+check_cmp libnm-core/nm-meta-setting-base-impl.h clients/common/nm-meta-setting-base-impl.h
+check_cmp libnm-core/nm-meta-setting-base-impl.c clients/common/nm-meta-setting-base-impl.c