Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in19
1 files changed, 4 insertions, 15 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in
index b2f7af04..b012b226 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in
@@ -23,6 +23,7 @@ LIBMAKEPKG_LINT_PKGBUILD_PKGBASE_SH=1
LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+source "$LIBRARY/lint_pkgbuild/pkgname.sh"
source "$LIBRARY/util/message.sh"
@@ -30,21 +31,9 @@ lint_pkgbuild_functions+=('lint_pkgbase')
lint_pkgbase() {
- local ret=0
-
- if [[ ${pkgbase:0:1} = "-" ]]; then
- error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
- return 1
- fi
- if [[ ${pkgbase:0:1} = "." ]]; then
- error "$(gettext "%s is not allowed to start with a dot.")" "pkgbase"
- ret=1
- fi
- if [[ $pkgbase = *[^[:alnum:]+_.@-]* ]]; then
- error "$(gettext "%s contains invalid characters: '%s'")" \
- 'pkgbase' "${i//[[:alnum:]+_.@-]}"
- ret=1
+ if [[ -z $pkgbase ]]; then
+ return 0
fi
- return $ret
+ lint_one_pkgname "pkgbase" "$pkgbase"
}