summaryrefslogtreecommitdiff
path: root/tools/run-pyflakes
blob: 4bea17f4e06db7c260cb35dcf9a73ba1dfbd3993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

PYTHON_VERSION=${PYTHON_VERSION:-2}
CR="
"
pycheck_dirs=( "cloudinit/" "bin/" "tests/" "tools/" )

set -f
if [ $# -eq 0 ]; then
   files=( "${pycheck_dirs[@]}" )
else
   files=( "$@" )
fi

cmd=( "python${PYTHON_VERSION}" -m "pyflakes" "${files[@]}" )

echo "Running: " "${cmd[@]}" 1>&2
exec "${cmd[@]}"