From ef1ef85ac3afd35b16f402f4c35c860c99dc72e8 Mon Sep 17 00:00:00 2001 From: DecaTec Date: Tue, 22 Jan 2019 09:47:41 +0100 Subject: [PATCH] Parameter handling --- NextcloudRestore.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NextcloudRestore.sh b/NextcloudRestore.sh index fabd463..1669a18 100644 --- a/NextcloudRestore.sh +++ b/NextcloudRestore.sh @@ -68,11 +68,11 @@ fileNameBackupDb="nextcloud-db.sql" errorecho() { cat <<< "$@" 1>&2; } # -# Check if parameter given +# Check if parameter(s) given # -if [ $# != "1" ] | [ $# != "2" ] +if [ $# != "1" ] && [ $# != "2" ] then - errorecho "ERROR: No backup name to restore given!" + errorecho "ERROR: No backup name to restore given, or wrong number of parameters!" errorecho "Usage: NextcloudRestore.sh 'BackupDate' ['BackupDirectory']" exit 1 fi -- 2.34.1