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)