From fdff30450fcd63a9700d9b02539e8d56ed28056d Mon Sep 17 00:00:00 2001 From: Ben Peddell Date: Fri, 14 Feb 2020 02:03:42 +1000 Subject: [PATCH] Allow non-empty backupAllMaps / includeAutoBackups Suggested in https://github.com/FezVrasta/ark-server-tools/pull/1059#discussion_r378030037 --- tools/arkmanager | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/arkmanager b/tools/arkmanager index 6413f60..ac0b7b7 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -2842,7 +2842,9 @@ doBackup(){ for arg in "$@"; do case "$arg" in --allmaps) backupAllMaps=true; ;; + --no-allmaps) backupAllMaps=false; ;; --autobackups) includeAutoBackups=true; ;; + --no-autobackups) includeAutoBackups=false; ;; *) echo "Unrecognized option $arg" echo "Try 'arkmanager -h' or 'arkmanager --help' for more information." @@ -2891,7 +2893,7 @@ doBackup(){ fi # Copy other world files - if [ "$backupAllMaps" == "true" ]; then + if [ -n "$backupAllMaps" ] && [ "$backupAllMaps" != "false" ]; then echo -e "${NORMAL} Copying other ARK world files" for f in "${savedir}/"*.ark; do if [[ "${f}" != "${mapfile}" && "${f}" != "${savedir}/"*_??.??.????_??.??.??.ark ]]; then @@ -2901,7 +2903,7 @@ doBackup(){ fi # Copy map autobackups - if [ "$includeAutoBackups" == "true" ]; then + if [ -n "$includeAutoBackups" ] && [ "$includeAutoBackups" != "false" ]; then echo -e "${NORMAL} Copying all ARK world autobackup files" for f in "${savedir}/"*.ark; do if [[ "${f}" == "${savedir}/"*_??.??.????_??.??.??.ark ]]; then