summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/lint_pkgbuild/epoch.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/libmakepkg/lint_pkgbuild/epoch.sh.in')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/epoch.sh.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/epoch.sh.in b/scripts/libmakepkg/lint_pkgbuild/epoch.sh.in
index 93bd05c1..c98f91b0 100644
--- a/scripts/libmakepkg/lint_pkgbuild/epoch.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/epoch.sh.in
@@ -29,9 +29,15 @@ source "$LIBRARY/util/message.sh"
lint_pkgbuild_functions+=('lint_epoch')
-lint_epoch() {
+check_epoch() {
+ local epoch=$1 type=$2
+
if [[ $epoch != *([[:digit:]]) ]]; then
- error "$(gettext "%s must be an integer, not %s.")" "epoch" "$epoch"
+ error "$(gettext "%s must be an integer, not %s.")" "epoch${type:+ in $type}" "$epoch"
return 1
fi
}
+
+lint_epoch() {
+ check_epoch "$epoch"
+}