From 56b4cd9ad2867cd23c7c038e1eb9388651a4b10d Mon Sep 17 00:00:00 2001 From: Alin Alexandru Date: Thu, 5 May 2022 16:28:52 +0300 Subject: [PATCH] fix: number of parameters to accept the optional parameters Changelog: Title Ticket: None Signed-off-by: Alin Alexandru --- modules/deb.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/deb.sh b/modules/deb.sh index 346de7e..3ed7eea 100644 --- a/modules/deb.sh +++ b/modules/deb.sh @@ -29,7 +29,7 @@ source modules/probe.sh . # function deb_from_repo_dist_get() { if [[ $# -lt 5 || $# -gt 7 ]]; then - log_fatal "deb_from_repo_dist_get() requires 5 arguments" + log_fatal "deb_from_repo_dist_get() requires 5 arguments. 6th is optional" fi local -r download_dir="${1}" local -r repo_url="${2}" @@ -68,8 +68,8 @@ function deb_from_repo_dist_get() { # @return - Filename of the downloaded package # function deb_from_repo_pool_get() { - if [[ $# -ne 5 ]]; then - log_fatal "deb_from_repo_pool_get() requires 5 arguments" + if [[ $# -lt 5 || $# -gt 7 ]]; then + log_fatal "deb_from_repo_pool_get() requires 5 arguments. 6th is optional" fi local -r download_dir="${1}" local -r repo_url="${2}"