Skip to content

Commit

Permalink
copy_examples: fix relative path; print number of copied examples
Browse files Browse the repository at this point in the history
  • Loading branch information
maul-esel committed Aug 19, 2024
1 parent 988230f commit 12777f6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""

SCRIPT_DIR = osp.abspath(osp.dirname(__file__))
TRUNK_DIR = osp.join(SCRIPT_DIR, "..", "..", "..", "..", "..")
TRUNK_DIR = osp.join(SCRIPT_DIR, "..", "..", "..", "..")
EXAMPLES_DIR = osp.join(TRUNK_DIR, "examples")
WEBINTERFACE_EXAMPLES_ROOT = osp.join(
SCRIPT_DIR, "..", "..", "webinterface", "code_examples"
Expand Down Expand Up @@ -148,11 +148,15 @@ def copy_examples():
if not osp.exists(dest):
os.makedirs(dest)

count = 0
for example in examples:
path = example["path"]
pattern = example["pattern"]
for file in glob.glob(rf"{path}/{pattern}"):
shutil.copy(file, dest)
count = count + 1
print(f" copied {count} examples for {tool}")

print("Done.")


Expand Down

0 comments on commit 12777f6

Please sign in to comment.