#!/bin/bash lines=`grep -P '\t' default.py | grep -v -e '^#' | wc -l` if [ "$lines" != "0" ] ; then echo Found lines with tab: grep -n -P '\t' default.py exit 1 fi echo "Checking syntax ..." python -m py_compile default.py rm -rf *.pyc __pycache__ python3 -m py_compile default.py rm -rf *.pyc __pycache__