@@ -223,3 +223,22 @@ def read():
223223
224224 BasicConfig ._update_config ()
225225 return
226+
227+
228+ def generate_dirs () -> None :
229+ """Generates the directory structure needed for Autosubmit operation."""
230+ Path (BasicConfig .DB_DIR ).mkdir (parents = True , exist_ok = True )
231+ Path (BasicConfig .LOCAL_ROOT_DIR ).mkdir (parents = True , exist_ok = True )
232+ Path (BasicConfig .STRUCTURES_DIR ).mkdir (parents = True , exist_ok = True )
233+ Path (BasicConfig .GLOBAL_LOG_DIR ).mkdir (parents = True , exist_ok = True )
234+ Path (BasicConfig .DEFAULT_OUTPUT_DIR ).mkdir (parents = True , exist_ok = True )
235+ Path (BasicConfig .JOBDATA_DIR ).mkdir (parents = True , exist_ok = True )
236+ Path (BasicConfig .HISTORICAL_LOG_DIR ).mkdir (parents = True , exist_ok = True )
237+
238+ os .chmod (BasicConfig .DB_DIR , 0o770 )
239+ os .chmod (BasicConfig .LOCAL_ROOT_DIR , 0o770 )
240+ os .chmod (BasicConfig .STRUCTURES_DIR , 0o770 )
241+ os .chmod (BasicConfig .GLOBAL_LOG_DIR , 0o770 )
242+ os .chmod (BasicConfig .DEFAULT_OUTPUT_DIR , 0o770 )
243+ os .chmod (BasicConfig .JOBDATA_DIR , 0o770 )
244+ os .chmod (BasicConfig .HISTORICAL_LOG_DIR , 0o770 )
0 commit comments