Changeset - 48415576fa5b
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-07-06 16:05:28
branko@majic.rs
Noticket: [factorio_manager.sh] Do not use bracket expansion for arithmetic tests and operations.
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
games/factorio_manager.sh
Show inline comments
 
@@ -234,7 +234,7 @@ EOF
 
# Set-up colours for message printing if we're not piping and terminal is
 
# capable of outputting the colors.
 
_color_terminal=$(tput colors 2>&1)
 
if [[ -t 1 ]] && (( ${_color_terminal} > 0 )); then
 
if [[ -t 1 ]] && (( _color_terminal > 0 )); then
 
    _text_black=$(tput setaf 0)
 
    _text_red=$(tput setaf 1)
 
    _text_green=$(tput setaf 2)
 
@@ -1075,7 +1075,7 @@ function select_factorio_version() {
 
        read -r -e -p "Please specify what version you would like to use (enter for $default_marker): " selected_option
 
        [[ -z $selected_option ]] && selected_option="$default_option"
 

	
 
        if [[ $selected_option =~ ^[[:digit:]]+$ ]] && (( $selected_option >= 1 && $selected_option <= ${#game_versions_available[@]} )); then
 
        if [[ $selected_option =~ ^[[:digit:]]+$ ]] && (( selected_option >= 1 && selected_option <= ${#game_versions_available[@]} )); then
 
            game_version_selected="${game_versions_available[$selected_option-1]}"
 
        else
 
            error "Invalid option selected, please try again."
 
@@ -1179,7 +1179,7 @@ while getopts "qdvh" opt; do
 
    esac
 
done
 
i=$OPTIND
 
shift $(($i-1))
 
shift $((i-1))
 

	
 
# Make sure the manager home directory exists.
 
if [[ ! -e $manager_directory ]]; then
 
@@ -1218,7 +1218,7 @@ if [[ $command == set-game-dir ]]; then
 
        fi
 
    done
 

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

	
 
        exit "$ERROR_GENERAL"
0 comments (0 inline, 0 general)