mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-19 05:28:29 +00:00
Allow non-empty backupAllMaps / includeAutoBackups
Suggested in https://github.com/FezVrasta/ark-server-tools/pull/1059#discussion_r378030037
This commit is contained in:
parent
092b92e1dd
commit
fdff30450f
@ -2842,7 +2842,9 @@ doBackup(){
|
|||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
--allmaps) backupAllMaps=true; ;;
|
--allmaps) backupAllMaps=true; ;;
|
||||||
|
--no-allmaps) backupAllMaps=false; ;;
|
||||||
--autobackups) includeAutoBackups=true; ;;
|
--autobackups) includeAutoBackups=true; ;;
|
||||||
|
--no-autobackups) includeAutoBackups=false; ;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognized option $arg"
|
echo "Unrecognized option $arg"
|
||||||
echo "Try 'arkmanager -h' or 'arkmanager --help' for more information."
|
echo "Try 'arkmanager -h' or 'arkmanager --help' for more information."
|
||||||
@ -2891,7 +2893,7 @@ doBackup(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy other world files
|
# Copy other world files
|
||||||
if [ "$backupAllMaps" == "true" ]; then
|
if [ -n "$backupAllMaps" ] && [ "$backupAllMaps" != "false" ]; then
|
||||||
echo -e "${NORMAL} Copying other ARK world files"
|
echo -e "${NORMAL} Copying other ARK world files"
|
||||||
for f in "${savedir}/"*.ark; do
|
for f in "${savedir}/"*.ark; do
|
||||||
if [[ "${f}" != "${mapfile}" && "${f}" != "${savedir}/"*_??.??.????_??.??.??.ark ]]; then
|
if [[ "${f}" != "${mapfile}" && "${f}" != "${savedir}/"*_??.??.????_??.??.??.ark ]]; then
|
||||||
@ -2901,7 +2903,7 @@ doBackup(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy map autobackups
|
# Copy map autobackups
|
||||||
if [ "$includeAutoBackups" == "true" ]; then
|
if [ -n "$includeAutoBackups" ] && [ "$includeAutoBackups" != "false" ]; then
|
||||||
echo -e "${NORMAL} Copying all ARK world autobackup files"
|
echo -e "${NORMAL} Copying all ARK world autobackup files"
|
||||||
for f in "${savedir}/"*.ark; do
|
for f in "${savedir}/"*.ark; do
|
||||||
if [[ "${f}" == "${savedir}/"*_??.??.????_??.??.??.ark ]]; then
|
if [[ "${f}" == "${savedir}/"*_??.??.????_??.??.??.ark ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user