blob: f0e292d6f01186390ec3f8f1fa4c94ab8219a40d (
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
|