summary refs log tree commit diff
path: root/Documentation/scripts
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-04-26 15:45:09 +0000
committerAlyssa Ross <hi@alyssa.is>2022-04-26 15:51:10 +0000
commita8a4dde7f6d62b858711b04129a8e00024c3ca69 (patch)
tree881273dd5f8eb07e98161a6a8d52d405a8e0d9fe /Documentation/scripts
parent5bd2370d422ff76839be5787493b7600974eddc5 (diff)
downloadspectrum-a8a4dde7f6d62b858711b04129a8e00024c3ca69.tar
spectrum-a8a4dde7f6d62b858711b04129a8e00024c3ca69.tar.gz
spectrum-a8a4dde7f6d62b858711b04129a8e00024c3ca69.tar.bz2
spectrum-a8a4dde7f6d62b858711b04129a8e00024c3ca69.tar.lz
spectrum-a8a4dde7f6d62b858711b04129a8e00024c3ca69.tar.xz
spectrum-a8a4dde7f6d62b858711b04129a8e00024c3ca69.tar.zst
spectrum-a8a4dde7f6d62b858711b04129a8e00024c3ca69.zip
Documentation: add script to find missing UUIDs
Diffstat (limited to 'Documentation/scripts')
-rw-r--r--Documentation/scripts/undocumented-uuids.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/scripts/undocumented-uuids.sh b/Documentation/scripts/undocumented-uuids.sh
new file mode 100644
index 0000000..a7cdd15
--- /dev/null
+++ b/Documentation/scripts/undocumented-uuids.sh
@@ -0,0 +1,14 @@
+#!/bin/sh -eu
+# SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
+# SPDX-License-Identifier: EUPL-1.2
+
+cd "$(dirname "$0")/../.."
+
+PATTERN='\b[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}\b'
+UUID_REFERENCE_PATH=Documentation/uuid-reference.adoc
+
+git ls-files -coz --exclude-standard |
+    grep -Fxvz "$UUID_REFERENCE_PATH" |
+    xargs -0 git grep -Ehio --no-index --no-line-number "$PATTERN" -- |
+    sort -u |
+    comm -23 - <(grep -Eio "$PATTERN" "$UUID_REFERENCE_PATH" | sort -u)