summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in4
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in5
2 files changed, 9 insertions, 0 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in
index 84666a29..51a25d2c 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in
@@ -45,6 +45,10 @@ lint_one_pkgname() {
error "$(gettext "%s is not allowed to start with a dot.")" "$type"
ret=1
fi
+ if [[ $name = *[![:ascii:]]* ]]; then
+ error "$(gettext "%s may only contain ascii characters.")" "$type"
+ return 1
+ fi
if [[ $name = *[^[:alnum:]+_.@-]* ]]; then
error "$(gettext "%s contains invalid characters: '%s'")" \
"$type" "${name//[[:alnum:]+_.@-]}"
diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
index 8d5d04f1..b0f45027 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in
@@ -41,6 +41,11 @@ check_pkgver() {
error "$(gettext "%s is not allowed to contain colons, forward slashes, hyphens or whitespace.")" "pkgver${type:+ in $type}"
return 1
fi
+
+ if [[ $ver = *[![:ascii:]]* ]]; then
+ error "$(gettext "%s may only contain ascii characters.")" "pkgver${type:+ in $type}"
+ return 1
+ fi
}
lint_pkgver() {