copied from preCICE tutorials
This commit is contained in:
parent
46a7e98752
commit
3f1b1a6d0f
68 changed files with 156449 additions and 0 deletions
24
preCICE_tools/check-image-names.py
Executable file
24
preCICE_tools/check-image-names.py
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
problems = False
|
||||
for file in sys.argv[1:]:
|
||||
parts = file.split(os.sep)
|
||||
# Ignore non-interesting files
|
||||
if len(parts) != 3 or parts[1] != "images":
|
||||
continue
|
||||
|
||||
if parts[0] == "quickstart":
|
||||
prefix = "quickstart-"
|
||||
else:
|
||||
prefix = f"tutorials-{parts[0]}-"
|
||||
|
||||
if not parts[2].startswith(prefix):
|
||||
print(f"Incorrect: {file}")
|
||||
print(f"Expected prefix: {prefix}")
|
||||
print()
|
||||
problems = True
|
||||
|
||||
sys.exit(1 if problems else 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue