File tree 6 files changed +2057
-1822
lines changed
6 files changed +2057
-1822
lines changed Original file line number Diff line number Diff line change 5
5
6
6
set -e
7
7
8
+ skip_items=(" cli.py" )
9
+
8
10
# Find all .py files in the current directory and its subdirectories.
9
11
find . -type f -name ' *.py' | while read -r file; do
10
12
# Check if the file is not empty.
11
13
if [ -s " $file " ]; then
12
- # Run the file using poetry.
13
- echo -e " \n\nRunning file: $file \n"
14
- poetry run python " $file "
14
+ # Check if the file or directory should be skipped
15
+ skip=false
16
+ echo -e " Checking $file "
17
+ for skip_item in " ${skip_items[@]} " ; do
18
+ if [[ " $file " == * " $skip_item " * ]]; then
19
+ echo " Skipping $file "
20
+ skip=true
21
+ break
22
+ fi
23
+ done
24
+
25
+ # Run the file if it should not be skipped
26
+ if [ " $skip " = false ]; then
27
+ # Run the file using poetry.
28
+ echo -e " \n\nRunning file: $file \n"
29
+ poetry run python " $file "
30
+ fi
15
31
else
16
32
echo " Skipping empty file: $file "
17
33
fi
You can’t perform that action at this time.
0 commit comments