aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Paul Mulders <info@mld.demon.nl> 2010-02-15 14:25:15 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-15 14:59:54 +0000
commitad17c42b5527f9ad3f66baa630e94b0eff3e088d (patch)
tree16337bcc8a3975a8c2b77e431a90a2642f2061ac
parentb1396996d5d99f5edcd25c644f4c8818afac6f0b (diff)
downloadpaludis-ad17c42b5527f9ad3f66baa630e94b0eff3e088d.tar.gz
paludis-ad17c42b5527f9ad3f66baa630e94b0eff3e088d.tar.xz
Make optional parameters for ever split e.a. actually optional. Make error messages consistent.
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/ever_functions.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash b/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash
index aff6905..df3f89a 100644
--- a/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash
@@ -25,17 +25,17 @@ ever()
local r="1;"
case "${1}" in
split)
- [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes one extra argument"
+ [[ "${#@}" != 1 ]] && [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes at most one extra argument"
r=$(paludis_pipe_command EVER "$EAPI" SPLIT "${2:-${PV}}" )
;;
split_all)
- [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes one extra argument"
+ [[ "${#@}" != 1 ]] && [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes at most one extra argument"
r=$(paludis_pipe_command EVER "$EAPI" SPLIT_ALL "${2:-${PV}}" )
;;
major)
- [[ "${#@}" != 1 ]] && [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes zero or one extra arguments"
+ [[ "${#@}" != 1 ]] && [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes at most one extra argument"
r=$(paludis_pipe_command EVER "$EAPI" RANGE 1 "${2:-${PV}}" )
;;
@@ -77,7 +77,7 @@ ever()
;;
is_scm)
- [[ "${#@}" != 1 ]] && [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes zero or one extra arguments"
+ [[ "${#@}" != 1 ]] && [[ "${#@}" != 2 ]] && die "$FUNCNAME $1 takes at most one extra argument"
r=$(paludis_pipe_command EVER "$EAPI" IS_SCM "${2:-${PV}}" )
;;