diff --git a/cloud-build.py b/cloud-build.py index 7d0b744..b2f5322 100755 --- a/cloud-build.py +++ b/cloud-build.py @@ -1,20 +1,12 @@ #!/usr/bin/python3 import argparse -import os from cloud_build import CB PROG = 'cloud-build' -def get_data_dir() -> str: - data_dir = (os.getenv('XDG_DATA_HOME', - os.path.expanduser('~/.local/share')) - + f'/{PROG}/') - return data_dir - - def parse_args(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, @@ -25,12 +17,6 @@ def parse_args(): default=f'/etc/{PROG}/config.yaml', help='path to config', ) - parser.add_argument( - '-d', - '--data-dir', - default=f'/usr/share/{PROG}', - help='system data directory', - ) parser.add_argument( '--no-tests', action='store_true', @@ -38,9 +24,6 @@ def parse_args(): ) args = parser.parse_args() - if not args.data_dir.endswith('/'): - args.data_dir += '/' - return args diff --git a/cloud_build/cloud_build.py b/cloud_build/cloud_build.py index 46f0e26..29cb4a8 100755 --- a/cloud_build/cloud_build.py +++ b/cloud_build/cloud_build.py @@ -36,7 +36,6 @@ class CB: self.images_dir = data_dir / 'images' self.work_dir = data_dir / 'work' self.out_dir = data_dir / 'out' - self.system_datadir = args.data_dir self.date = datetime.date.today().strftime('%Y%m%d') self.service_default_state = 'enabled'