From a191768aed2031b2ee7b716b0d7fdf5e9a51a07e Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 4 Apr 2025 15:40:33 +0200 Subject: [PATCH] Fix. --- testing/home/desktop/.local/bin/borgplom | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/home/desktop/.local/bin/borgplom index 1ac2ce2..0a648f0 100755 --- a/testing/home/desktop/.local/bin/borgplom +++ b/testing/home/desktop/.local/bin/borgplom @@ -30,11 +30,9 @@ _check_args_n() { shift 2 if [ "$#" -lt "${_N_MIN_ARGS}" ]; then error_exit_with_usage "missing arguments ($# instead of ${_N_MAX_ARGS})." - fi - shift "${_N_MAX_ARGS}" - if [ "$#" -gt 0 ]; then - _MSG="unexpected arguments beyond expected number: $@" - error_exit_with_usage "${_MSG}" + elif [ "$#" -gt "${_N_MAX_ARGS}" ]; then + shift "${_N_MAX_ARGS}" + error_exit_with_usage "unexpected arguments beyond expected number: $@" fi } -- 2.30.2