From: Luke Kenneth Casson Leighton Date: Thu, 24 May 2018 08:57:11 +0000 (+0100) Subject: make mdwn path if it doesnt exist X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=302b814c4144d9bf2ef0ef7f29134bfa97c5cbd1;p=pinmux.git make mdwn path if it doesnt exist --- diff --git a/src/pinmux_generator.py b/src/pinmux_generator.py index 9512d4d..c88146b 100644 --- a/src/pinmux_generator.py +++ b/src/pinmux_generator.py @@ -77,7 +77,11 @@ if __name__ == '__main__': printhelp() sys.exit(1) module = modules[pinspec] + fname = os.path.join(output_dir or '', "%s.mdwn" % pinspec) + d = os.path.split(fname)[0] + if not os.path.exists(d): + os.makedirs(d) with open(fname, "w") as of: pinout, bankspec, pinspec, fixedpins = module.pinspec(of) specgen(of, output_dir, pinout, bankspec, pinspec, fixedpins)