Skip to content

Commit a442d06

Browse files
committed
examples: add Share CLI example (PAN-8682)
1 parent 14ca8e2 commit a442d06

File tree

6 files changed

+2057
-1822
lines changed

6 files changed

+2057
-1822
lines changed

Diff for: dev/run_examples.sh

+19-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,29 @@
55

66
set -e
77

8+
skip_items=("cli.py")
9+
810
# Find all .py files in the current directory and its subdirectories.
911
find . -type f -name '*.py' | while read -r file; do
1012
# Check if the file is not empty.
1113
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
1531
else
1632
echo "Skipping empty file: $file"
1733
fi

0 commit comments

Comments
 (0)