mirror of https://github.com/fail2ban/fail2ban
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
373 B
17 lines
373 B
#!/bin/bash |
|
# This script carries out conversion of fail2ban to python3 |
|
# A backup of any converted files are created with ".bak" |
|
# extension |
|
|
|
set -eu |
|
|
|
nonPyFiles="fail2ban-client fail2ban-server fail2ban-regex fail2ban-testcases" |
|
|
|
find . \ |
|
-name "*.py" \ |
|
-exec 2to3 -w --no-diffs $nonPyFiles {} + \ |
|
|| (echo "Fail!" >&2 && exit 1) |
|
|
|
echo "Success!" >&2 |
|
|
|
exit 0
|
|
|