From 3de46ad225dddd67f27aef580ad19fff5c5ca524 Mon Sep 17 00:00:00 2001 From: MialLewis <95620982+MialLewis@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:18:18 +0000 Subject: [PATCH] add config dir creation --- EVSVesuvio/scripts/__init__.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/EVSVesuvio/scripts/__init__.py b/EVSVesuvio/scripts/__init__.py index dd64ce45..99787b72 100644 --- a/EVSVesuvio/scripts/__init__.py +++ b/EVSVesuvio/scripts/__init__.py @@ -1,9 +1,20 @@ """Package defining top-level application and entry points. """ +import os +from shutil import copyfile def main(): - """Placeholder. - """ - print("TEST_VESUVIO_LAUNCH") + make_config_dir() + + +def make_config_dir(): + config_dir = os.path.join(os.path.expanduser("~"), '.mvesuvio') + if not os.path.isdir(config_dir): + os.mkdir(config_dir) + copyfile('EVSVesuvio/config/vesuvio.user.properties', f'{config_dir}/vesuvio.user.properties') + + +if __name__ == '__main__': + main()