mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix isolate_tests when run with single files and add usage information
This commit is contained in:
parent
7f65f1cc02
commit
f62b80530b
@ -106,13 +106,18 @@ def extract_and_write(f, path):
|
||||
write_cases(f, cases)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) == 1:
|
||||
print("Usage: " + sys.argv[0] + " path-to-file-or-folder-to-extract-code-from [docs]")
|
||||
exit(1)
|
||||
|
||||
path = sys.argv[1]
|
||||
docs = False
|
||||
if len(sys.argv) > 2 and sys.argv[2] == 'docs':
|
||||
docs = True
|
||||
|
||||
if isfile(path):
|
||||
extract_and_write(path, path)
|
||||
_, tail = split(path)
|
||||
extract_and_write(tail, path)
|
||||
else:
|
||||
for root, subdirs, files in os.walk(path):
|
||||
if '_build' in subdirs:
|
||||
|
Loading…
Reference in New Issue
Block a user