[pve-devel] [PATCH proxmox-acme 2/2] add shellscript to find needed functions not provided by proxmox-acme

Stoiko Ivanov s.ivanov at proxmox.com
Fri Mar 4 16:10:59 CET 2022


based on the heuristic I used a while ago. Adapted to catch the
functions missed the last time.

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 check-missing-functions | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100755 check-missing-functions

diff --git a/check-missing-functions b/check-missing-functions
new file mode 100755
index 0000000..a76aefc
--- /dev/null
+++ b/check-missing-functions
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# functions already in src/proxmox-acme
+PRESENT=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
+	src/proxmox-acme | sed -r 's/\|$//')
+# functions defined in all plugins
+LOCAL=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
+	src/acme.sh/dnsapi/dns*.sh | sed -r 's/\|$//')
+
+grep -E '\b_[a-zA-Z0-9_-]+ ' src/acme.sh/dnsapi/dns_*sh | \
+	grep -Ev "$PRESENT|$LOCAL|\b_[a-zA-Z0-9_-]+=|^src/acme.sh/dnsapi/.*sh: *#"
-- 
2.30.2






More information about the pve-devel mailing list