From 08f16f23988e9947c8d3ffebe3a2a40a75570ed8 Mon Sep 17 00:00:00 2001 From: tofasthacker Date: Mon, 19 Feb 2024 17:03:21 -0500 Subject: [PATCH] added location argument --- backup | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backup b/backup index 87beaf0..5c2a01f 100755 --- a/backup +++ b/backup @@ -1,6 +1,12 @@ #!/bin/bash +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + + +BACKUP_LOCATION=$1+"-"+$(date +%Y-%m-%d) -BACKUP_LOCATION="/nas/share/backup-$(date +%Y-%m-%d).tar" COMPRESS=false rm -f $BACKUP_LOCATION