Changeset - 09c52b03d177
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-07-06 17:17:15
branko@majic.rs
Noticket: [factorio_manager.sh] Disable checks for concurrent reading/writing to a lock file:

- Warnings will still trigger for 200>"$lock_file" lines, but
currently it does not seem possible to disable the check for those
lines only - unless the check is disabled for the entire subshell.
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general) First comment
games/factorio_manager.sh
Show inline comments
 
@@ -1471,7 +1471,7 @@ elif [[ $command == backup ]]; then
 
    validate_path_or_terminate "backup_directory_new" "$backup_destination" "$ERROR_GENERAL"
 

	
 
    (
 

	
 
        # shellcheck disable=SC2094 # Lock file is not being read from.
 
        lock "$lock_file" 200
 

	
 
        # Backup the instance. Clean-up the backup destination in case of failure.
 
@@ -1594,6 +1594,7 @@ elif [[ $command == restore ]]; then
 
    validate_path_or_terminate "backup_directory" "$restore_source" "$ERROR_ARGUMENTS"
 

	
 
    (
 
        # shellcheck disable=SC2094 # Lock file is not being read from.
 
        lock "$lock_file" 200
 

	
 
        # Set-up a list of files and directories that will get removed.
 
@@ -1947,6 +1948,7 @@ elif [[ $command == remove ]]; then
 
    validate_path_or_terminate "instance_directory" "$instance_directory" "$ERROR_ARGUMENTS"
 

	
 
    (
 
        # shellcheck disable=SC2094 # Lock file is not being read from.
 
        lock "$lock_file" 200
 

	
 
        # Set-up a list of files and directories that will get removed.
 
@@ -2050,6 +2052,7 @@ elif [[ $command == copy ]]; then
 
    validate_path_or_terminate "instance_directory_new" "$destination_instance_directory" "$ERROR_ARGUMENTS"
 

	
 
    (
 
        # shellcheck disable=SC2094 # Lock file is not being read from.
 
        lock "$source_lock_file" 200
 

	
 
        # Load source instance configuration.
 
@@ -2195,7 +2198,7 @@ elif [[ $command == import ]]; then
 
    select_factorio_version "$game_installations_directory" || exit "$ERROR_GENERAL"
 

	
 
    (
 

	
 
        # shellcheck disable=SC2094 # Lock file is not being read from.
 
        lock "$source_lock_file" 200
 

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