summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions16
1 files changed, 16 insertions, 0 deletions
diff --git a/db-functions b/db-functions
index f4f9ee9..6611a92 100644
--- a/db-functions
+++ b/db-functions
@@ -110,4 +110,20 @@ get_repos_for_host() {
fi
}
+#usage: chk_license ${license[@]}"
+chk_license() {
+ local l
+ for l in "$@"; do
+ l="$(echo $l | tr '[:upper:]' '[:lower:]')"
+ for allowed in ${ALLOWED_LICENSES[@]}; do
+ allowed="$(echo $allowed | tr '[:upper:]' '[:lower:]')"
+ if [ "$l" = "$allowed" ]; then
+ return 0
+ fi
+ done
+ done
+
+ return 1
+}
+
# vim: set ts=4 sw=4 noet ft=sh: