Changeset - b9f67051f093
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-07-05 16:07:40
branko@majic.rs
Noticket: Rename slightly backup-related varibles in Factorio Manager to make them less ambigous.
1 file changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general) First comment
games/factorio_manager.sh
Show inline comments
 
@@ -1325,8 +1325,7 @@ elif [[ $command == backup ]]; then
 
    game_config="$instance_directory/config.ini"
 
    lock_file="$instance_directory/.lock"
 

	
 
    backup_directory="$instance_directory/.bak"
 
    backup_destination="$backup_directory/$timestamp"
 
    backup_destination="$instance_directory/.bak/$timestamp"
 
    backup_description="$backup_destination/.description"
 

	
 
    # Verify positional arguments.
 
@@ -1388,7 +1387,7 @@ elif [[ $command == list-backups ]]; then
 
    instance_directory="$manager_directory/$instance"
 
    instance_config="$instance_directory/instance.conf"
 
    game_config="$instance_directory/config.ini"
 
    backup_directory="$instance_directory/.bak"
 
    instance_backup_directory="$instance_directory/.bak"
 

	
 
    # Verify positional arguments.
 
    if [[ -z $instance ]]; then
 
@@ -1408,13 +1407,13 @@ elif [[ $command == list-backups ]]; then
 
    unset game_version
 

	
 
    # Detect and show available backups to the user.
 
    if [[ ! -d $backup_directory ]] || ! ls "$backup_directory" | grep -q -E "^$backup_destination_name_pattern\$"; then
 
    if [[ ! -d $instance_backup_directory ]] || ! ls "$instance_backup_directory" | grep -q -E "^$backup_destination_name_pattern\$"; then
 
        echo "No backups are available for instance $(colorecho -n green "$instance")."
 
    else
 
        echo "Available backups for instance $(colorecho -n green "$instance") (current version $(colorecho -n green "$current_game_version"))."
 
        echo
 

	
 
        for backup_destination in "$backup_directory"/*; do
 
        for backup_destination in "$instance_backup_directory"/*; do
 

	
 
            if [[ $backup_destination =~ $backup_destination_name_pattern ]]; then
 
                backup_date=$(basename "$backup_destination")
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now