From 6f0fd676b03a8cfde1789bda35d1aaf375ab149b Mon Sep 17 00:00:00 2001 From: Adam Bucko Date: Fri, 7 Jun 2024 15:38:24 +0200 Subject: [PATCH] --home_path (optional) argument added --- dcs_deploy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dcs_deploy.py b/dcs_deploy.py index ab6f228..0a26111 100755 --- a/dcs_deploy.py +++ b/dcs_deploy.py @@ -245,6 +245,9 @@ def add_common_parser(self, subparser): rootfs_help = 'Path to customized root filesystem. Keep in mind that this needs to be a valid tbz2 archive.' subparser.add_argument('--rootfs', help=rootfs_help) + home_path_help = 'Optional. Specify a custom home path. Defaults to the user home directory.' + subparser.add_argument('--home_path', help=home_path_help, default=os.path.expanduser('~')) + def create_parser(self): """ Create an ArgumentParser and all its options @@ -369,7 +372,7 @@ def init_filesystem(self): self.config['rootfs_type'] ) - self.home = os.path.expanduser('~') + self.home = self.args.home_path self.dsc_deploy_root = os.path.join(self.home, '.dcs_deploy') self.download_path = os.path.join(self.dsc_deploy_root, 'download') self.flash_path = os.path.join(self.dsc_deploy_root, 'flash', config_relative_path)