ZH: matrix: setup softlink for clockfiles if possible

This commit is contained in:
Eric Teunis de Boone 2023-03-27 16:48:44 +02:00
parent a58567728d
commit bc712b5dbb

View file

@ -17,10 +17,17 @@ for options in product(baselines, clock_devs, noise_sigmas, trace_lengths):
# Make directory
if path.exists(dirname):
print(f"{dirname} already exists! continuing..")
print(f"{dirname} already exists! continuing anyway..")
os.makedirs(dirname, exist_ok=True)
# Soft link clock file if available
if True:
os.makedirs(path.join(dirname, 'data'), exist_ok=True)
if not path.isfile(path.join(dirname, 'data/clocks.csv')):
os.symlink(f'../../c{clk_dev}_clocks.csv', path.join(dirname, 'data/clocks.csv'))
# Setup config.mk
with open(path.join(dirname, 'env.sh'), 'w') as fp:
template = f"""