mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
9d41aefd71
* Improve PEP8 compatibility * Fix Python 3 incompatibility Is prohibited to mutate OrderedDict during iteration through it so is better to add records with error or warning to empty dictionary instead of delete records from copy of dictionary during iterating. * Decode output of subprocess from bytes to unicode. * Add Python 3 support for validate-modules test. Fix #18367
22 lines
733 B
Bash
Executable file
22 lines
733 B
Bash
Executable file
#!/bin/sh
|
|
|
|
grep '^#!' -rIn . \
|
|
--exclude-dir .git \
|
|
--exclude-dir .tox \
|
|
| grep ':1:' | sed 's/:1:/:/' | grep -v -E \
|
|
-e '^\./lib/ansible/modules/' \
|
|
-e '^\./test/integration/targets/[^/]*/library/[^/]*:#!powershell$' \
|
|
-e '^\./test/integration/targets/[^/]*/library/[^/]*:#!/usr/bin/python$' \
|
|
-e '^\./hacking/cherrypick.py:#!/usr/bin/env python3$' \
|
|
-e ':#!/bin/sh$' \
|
|
-e ':#!/bin/bash( -[eux]|$)' \
|
|
-e ':#!/usr/bin/make -f$' \
|
|
-e ':#!/usr/bin/env python$' \
|
|
-e ':#!/usr/bin/env bash$' \
|
|
-e ':#!/usr/bin/env fish$' \
|
|
|
|
if [ $? -ne 1 ]; then
|
|
echo "One or more file(s) listed above have an unexpected shebang."
|
|
echo "See $0 for the list of acceptable values."
|
|
exit 1
|
|
fi
|