summaryrefslogtreecommitdiff
path: root/db-functions
diff options
context:
space:
mode:
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions35
1 files changed, 2 insertions, 33 deletions
diff --git a/db-functions b/db-functions
index d2df1a7..67a52aa 100644
--- a/db-functions
+++ b/db-functions
@@ -347,44 +347,13 @@ check_pkgrepos() {
#usage: chk_license ${license[@]}"
chk_license() {
local l
- local allowed
- 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
+ for l in ${@}; do
+ in_array ${l} ${ALLOWED_LICENSES[@]} && return 0
done
return 1
}
-pkgname_from_src() {
- local tmp
- local a
- tmp=${1##*/}
- tmp=${tmp%$SRCEXT}
- for a in ${ARCHES[@]}; do
- tmp=${tmp%-$a}
- done
- tmp=${tmp%-any}
- echo ${tmp%-*-*}
-}
-
-pkgver_from_src() {
- local tmp
- local a
- tmp=${1##*/}
- tmp=${tmp%$SRCEXT}
- for a in ${ARCHES[@]}; do
- tmp=${tmp%-$a}
- done
- tmp=${tmp%-any}
- echo $tmp | sed 's|.*-\(.*-.*\)$|\1|g'
-}
-
check_repo_permission() {
local repo=$1