summaryrefslogtreecommitdiffstats
path: root/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
index b9e2e439..c105212b 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
@@ -30,13 +30,15 @@ lint_pkgbuild_functions+=('lint_pkgver')
check_pkgver() {
- if [[ -z $1 ]]; then
- error "$(gettext "%s is not allowed to be empty.")" "pkgver"
+ local ver=$1 type=$2
+
+ if [[ -z $ver ]]; then
+ error "$(gettext "%s is not allowed to be empty.")" "pkgver${type:+ in $type}"
return 1
fi
- if [[ $1 = *[[:space:]/:-]* ]]; then
- error "$(gettext "%s is not allowed to contain colons, forward slashes, hyphens or whitespace.")" "pkgver"
+ if [[ $ver = *[[:space:]/:-]* ]]; then
+ error "$(gettext "%s is not allowed to contain colons, forward slashes, hyphens or whitespace.")" "pkgver${type:+ in $type}"
return 1
fi
}