]> git.proxmox.com Git - proxmox-acme.git/commitdiff
move check-missing-function script to tests
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Apr 2022 08:37:34 +0000 (10:37 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Apr 2022 08:38:41 +0000 (10:38 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
check-missing-functions [deleted file]
src/test/check-missing-functions [new file with mode: 0755]

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