Skip to content

Commit

Permalink
Add format script dir argument to generate script
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlocke committed Feb 8, 2024
1 parent 0d6f0ba commit fbf621f
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions generate_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
type=str,
help='Path to format output.',
)
_cmdline_parser.add_argument(
'-fs',
'--format-script-dir',
type=str,
help='Path to format script directory.',
)
_cmdline_parser.add_argument(
'-e',
'--exclude-from-analysis',
Expand Down Expand Up @@ -84,9 +90,13 @@ def main():
stone_path = args.stone

dropbox_src_path = os.path.abspath('Source')
dropbox_default_output_path = os.path.abspath('Source/ObjectiveDropboxOfficial/Shared/Generated')
dropbox_default_output_path = \
os.path.abspath('Source/ObjectiveDropboxOfficial/Shared/Generated')
dropbox_pkg_path = args.output_path if args.output_path else dropbox_default_output_path
dropbox_format_script_path = os.path.abspath('Format')

dropbox_format_script_dir = args.format_script_dir if args.format_script_dir else \
os.path.abspath('Format')

dropbox_format_output_path = args.format_output_path if args.format_output_path else dropbox_src_path

# clear out all old files
Expand Down Expand Up @@ -156,7 +166,7 @@ def main():
print('Formatting source files')

cmd = ['./format_files.sh', dropbox_format_output_path]
o = subprocess.check_output(cmd, cwd=dropbox_format_script_path)
o = subprocess.check_output(cmd, cwd=dropbox_format_script_dir)
if o:
print('Output:', o)

Expand Down

0 comments on commit fbf621f

Please sign in to comment.