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