summaryrefslogtreecommitdiff
path: root/tools/run-pyflakes
blob: b3759a9421a21da20a5f2ef221fa09950ad62504 (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/" "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[@]}"