From b6568cf4710021641975aec2c51affd3f4a094b0 Mon Sep 17 00:00:00 2001 From: Michael Krayer Date: Thu, 25 Mar 2021 17:23:38 +0100 Subject: [PATCH] print usage when less than two arguments are provided --- icp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/icp b/icp index dcd3b18..6f41a13 100755 --- a/icp +++ b/icp @@ -49,6 +49,12 @@ do exit $EXIT_INVALID_PATH fi done + +# Check if we got any actual arguments +if [[ ${#rsync_arg[@]} -lt 2 ]];then + usage + exit $EXIT_INVALID_PATH +fi # If last argument (target) is a directory # add a trailing slash