Changeset - 3eb1122f2c35
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-07-06 16:08:57
branko@majic.rs
Noticket: [factorio_manager.sh] Use arithmetic compund command instead of let built-in command.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general) First comment
games/factorio_manager.sh
Show inline comments
 
@@ -840,13 +840,13 @@ function read_server_settings() {
 
                    [[ $validation_result == 2 ]] && error "Internal error, type not set correctly for setting: $key." && exit "$ERROR_GENERAL"
 
                done
 

	
 
                settings_value[$key]="$value"
 

	
 
                echo
 
                let current_question++
 
                (( current_question++ ))
 
            done
 
        fi
 
    done
 

	
 
    # Prepare values so they can be used within the JSON file.
 
    for key in "${settings_order[@]}"; do
 
@@ -1053,13 +1053,13 @@ function select_factorio_version() {
 
    fi
 

	
 
    echo "The following versions of Factorio are locally available:"
 
    echo
 

	
 
    for i in "${!game_versions_available[@]}"; do
 
        let i++
 
        (( i++ ))
 
        echo -n "  [$i] $(basename "${game_versions_available[$i-1]}")"
 

	
 
        # Highlight default version.
 
        if [[ -z $default_version && $i == "${#game_versions_available[@]}" ]] || \
 
               [[ -n $default_version && ${game_versions_available[i-1]} == "$default_version" ]]; then
 
            colorecho boldgreen " [$default_marker]"
 
@@ -1211,13 +1211,13 @@ if [[ $command == set-game-dir ]]; then
 
    fi
 

	
 
    # Verify that at least one Factorio instance can be found.
 
    factorio_versions_found=0
 
    for candidate in "$game_installations_directory_target"/*; do
 
        if [[ -f $candidate/bin/x64/factorio ]]; then
 
            let factorio_versions_found++
 
            (( factorio_versions_found++ ))
 
        fi
 
    done
 

	
 
    if (( factorio_versions_found == 0 )); then
 
        error "Could not locate any Factorio installations under: $game_installations_directory_target"
 

	
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now