Added -ow option which allows for automatic overwriting

This commit is contained in:
Alex Selimov 2020-01-28 10:59:49 -05:00
parent 9ebdfff0a1
commit a942b8e2a1
4 changed files with 28 additions and 4 deletions

View file

@ -37,11 +37,23 @@ program main
!Call initialization functions
call lattice_init
call box_init
force_overwrite=.false.
end_mode_arg = 0
! Command line parsing
arg_num = command_argument_count()
!Check to see if overwrite flag is passed
do i = 1, arg_num
call get_command_argument(i,argument)
select case(trim(adjustl(argument)))
case('-ow')
force_overwrite = .true.
print *, "Overwrite flag passed, output files will be overwritten"
end select
end do
!Determine if a mode is being used and what it is. The first argument has to be the mode
!if a mode is being used
call get_command_argument(1, argument)