Skip to content

Commit

Permalink
Merge pull request #376 from dropbox/portable_generate_base_client
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlocke authored Feb 9, 2024
2 parents ef49fcf + 4679628 commit 31022f9
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions generate_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
import subprocess
import sys

def dir_path(string):
if os.path.isdir(string):
return string
else:
raise NotADirectoryError(string)

cmdline_desc = """\
Runs Stone to generate Obj-C types and client for the Dropbox client.
"""
Expand Down Expand Up @@ -51,6 +57,12 @@
type=str,
help='Path to format output.',
)
_cmdline_parser.add_argument(
'-fs',
'--format-script-path',
type=dir_path,
help='Path to format script directory.',
)
_cmdline_parser.add_argument(
'-e',
'--exclude-from-analysis',
Expand Down Expand Up @@ -84,9 +96,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_path = args.format_script_path if args.format_script_path 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

0 comments on commit 31022f9

Please sign in to comment.