Changeset - fcdd1d003a97
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-07-06 16:24:50
branko@majic.rs
Noticket: [factorio_manager.sh] Use quoting style with ls when grepping for filename patterns.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general) First comment
games/factorio_manager.sh
Show inline comments
 
@@ -1523,7 +1523,8 @@ elif [[ $command == list-backups ]]; then
 
    unset game_version
 

	
 
    # Detect and show available backups to the user.
 
    if [[ ! -d $instance_backup_directory ]] || ! ls "$instance_backup_directory" | grep -q -E "^$backup_destination_name_pattern\$"; then
 
    # shellcheck disable=SC2010 # Using ls with quoting style shell-escape will produce one filename per line.
 
    if [[ ! -d $instance_backup_directory ]] || ! ls --quoting-style=shell-escape "$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"))."
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now