#!/bin/bash

if [ $# -eq 0 ]; then
   files=( $(find * -name "*.py" -type f)
           $(for f in bin/*; do [ "${f%.*}" = "$f" ] && echo "$f"; done) )
else
   files=( "$@" );
fi

cmd=( pep8 "${files[@]}" )

echo -e "\nRunning pep8:"
echo "${cmd[@]}"
"${cmd[@]}"
