@@ -159,6 +159,16 @@ def teardown_runtime(runtime_dir: Path) -> None:
159
159
type = click .Path (exists = True , file_okay = True , dir_okay = True ),
160
160
help = "VTD project to use, default to currently symlinked." ,
161
161
)
162
+ @click .option (
163
+ "-m" ,
164
+ "--vtd-external-models" ,
165
+ envvar = "VTD_EXTERNAL_MODELS" ,
166
+ multiple = True ,
167
+ type = click .Path (file_okay = True , dir_okay = False ),
168
+ default = [],
169
+ required = False ,
170
+ help = "VTD external models (env: $VTD_EXTERNAL_MODELS)." ,
171
+ )
162
172
@click .option (
163
173
"-n" ,
164
174
"--no-start" ,
@@ -178,6 +188,7 @@ def start(
178
188
skip_setup : bool ,
179
189
vtd_setup : str ,
180
190
vtd_project : str ,
191
+ vtd_external_models : List [str ],
181
192
no_start : bool ,
182
193
vtd_args : str ,
183
194
):
@@ -220,6 +231,14 @@ def start(
220
231
os .remove (dst )
221
232
os .symlink (vtd_project , dst )
222
233
234
+ for srcfile in vtd_external_models :
235
+ srcfile = Path (srcfile )
236
+ dstdir = opt .runtime_dir / "Data" / "Setups" / "Current" / "Bin"
237
+ dstfile = dstdir / srcfile .name
238
+ if not dstfile .is_file ():
239
+ logging .debug ("Create symlink: {} -> {}" .format (dstfile , srcfile ))
240
+ os .symlink (srcfile , dstfile )
241
+
223
242
if no_start :
224
243
return
225
244
0 commit comments