1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/code-smell/use-compat-six.sh

13 lines
265 B
Bash
Raw Normal View History

#!/bin/sh
# Do we want to check dynamic inventory, bin, etc?
BASEDIR=${1-"lib"}
SIX_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -H six \{\} \;|grep import |grep -v ansible.compat)
if test -n "$SIX_USERS" ; then
printf "$SIX_USERS"
exit 1
else
exit 0
fi