From 193bf8e7c294b4917af92caadc2f9880add09ea4 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 19 Sep 2024 10:57:39 -0700 Subject: [PATCH] make sure existing_backups array is set in remove_expired_backups function --- sbin/bashup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbin/bashup.sh b/sbin/bashup.sh index 36b0a23..00eedbd 100755 --- a/sbin/bashup.sh +++ b/sbin/bashup.sh @@ -168,6 +168,10 @@ function bashup::remove_expired_backups () { # check for and set directory var if [ -n "$1" ]; then directory=$1 + # make sure existing_backups array is set + if [[ -z $existing_backups ]]; then + bashup::set-existing_backups + fi else echo "ERROR: directory var not set" return 1