Skip to content

Commit

Permalink
Add an option to direct output to another directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Apr 25, 2024
1 parent c50b744 commit ec28e2f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/transom/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,14 @@ def __init__(self, home=None):
subparsers = self.parser.add_subparsers(title="subcommands")

common = _argparse.ArgumentParser()
common.add_argument("--init-only", action="store_true",
help=_argparse.SUPPRESS)
common.add_argument("--verbose", action="store_true",
help="Print detailed logging to the console")
common.add_argument("--quiet", action="store_true",
help="Print no logging to the console")
common.add_argument("--init-only", action="store_true",
help=_argparse.SUPPRESS)
common.add_argument("--output", metavar="OUTPUT-DIR",
help="The output directory (default: PROJECT-DIR/output)")
common.add_argument("project_dir", metavar="PROJECT-DIR", nargs="?", default=".",
help="The project root directory (default: current directory)")

Expand Down Expand Up @@ -615,6 +617,10 @@ def init(self, args=None):

if self.args.command_fn != self.init_command:
self.lib = Transom(self.args.project_dir, verbose=self.verbose, quiet=self.quiet)

if self.args.output:
self.lib.output_dir = self.args.output

self.lib.init()

def main(self, args=None):
Expand Down

0 comments on commit ec28e2f

Please sign in to comment.