blob: a6a61090d350f2e5dcf6815ae8d77c457ca3800d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/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
|