From: Thomas Lamprecht Date: Tue, 26 Apr 2022 08:37:34 +0000 (+0200) Subject: move check-missing-function script to tests X-Git-Url: https://git.proxmox.com/?p=proxmox-acme.git;a=commitdiff_plain;h=9ba73e66c09179b4a37fb1ce3b9513c30ef7df37;ds=sidebyside move check-missing-function script to tests Signed-off-by: Thomas Lamprecht --- diff --git a/check-missing-functions b/check-missing-functions deleted file mode 100755 index a76aefc..0000000 --- a/check-missing-functions +++ /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 index 0000000..c8a2b3d --- /dev/null +++ b/src/test/check-missing-functions @@ -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: *#"