1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/bash py_files=$(find . -name '*.py' -not -path "*/node_modules/*" -not -path "*/target/*") if python3 -m py_compile ${py_files} then echo "All python files compiled successfully" exit 0 else echo "Failed to compile all files in Python 3" exit 1 fi