makedirs Subroutine

subroutine makedirs(outdir)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: outdir

Source Code

subroutine makedirs(outdir)
  implicit none
  character(len=*), intent(in) :: outdir
  character(len=256) command
  write(command, *) 'if [ ! -d ', trim(outdir), ' ]; then mkdir -p ', trim(outdir), '; fi'
!  write(*, *) trim(command)
  call system(command)
end subroutine makedirs