bashup::set-retention_array function fixes

This commit is contained in:
Matthew Saunders Brown 2021-04-23 09:49:36 -07:00
parent 7f413eda04
commit ab487bdc80
5 changed files with 8 additions and 9 deletions

View File

@ -7,8 +7,7 @@
# load include file
source $(dirname $0)/bashup.sh
bashup::set_existing_backups
bashup::set_retention_array
bashup::set-retention_array
# create backup for today
if [[ " ${retention_array[@]} " =~ " ${today} " ]]; then

View File

@ -7,8 +7,7 @@
# load include file
source $(dirname $0)/bashup.sh
bashup::set_existing_backups
bashup::set_retention_array
bashup::set-retention_array
# create backup for today
if [[ " ${retention_array[@]} " =~ " ${today} " ]]; then

View File

@ -7,8 +7,7 @@
# load include file
source $(dirname $0)/bashup.sh
bashup::set_existing_backups
bashup::set_retention_array
bashup::set-retention_array
# create backup for today
if [[ " ${retention_array[@]} " =~ " ${today} " ]]; then

View File

@ -92,7 +92,9 @@ if [ ! -z "$backup" ]; then
fi
else
# output list of backups (dates)
ls -1 $backup_storage_dir | grep -v lost+found
for existing_backup in "${existing_backups[@]}"; do
echo $existing_backup
done
fi
bashup::unmount_storage_dir

View File

@ -70,9 +70,9 @@ if [[ "$0" == *"-backup-"* ]];then
fi
fi
function bashup::set_retention_array () {
function bashup::set-retention_array () {
declare -a retention_array
declare -a -g retention_array
# set retention days
if [ $retention_days -gt 0 ]; then