diff options
author | Steven Hiscocks <steven@hiscocks.me.uk> | 2013-02-24 18:27:40 +0000 |
---|---|---|
committer | Steven Hiscocks <steven@hiscocks.me.uk> | 2013-02-24 18:27:40 +0000 |
commit | dbc40d6210f1b67e18834cf9c84d822013c52897 (patch) | |
tree | 9f9022844491356573afebb57c5d7618e6306863 /fail2ban-2to3 | |
parent | c8c9ed4dfcf5526defc84a18279f38d79fb7b2ca (diff) | |
download | fail2ban-dbc40d6210f1b67e18834cf9c84d822013c52897.tar.gz |
Added helper scripts to carry out 2to3 and testcases on python3
Diffstat (limited to 'fail2ban-2to3')
-rwxr-xr-x | fail2ban-2to3 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fail2ban-2to3 b/fail2ban-2to3 new file mode 100755 index 00000000..f0e292d6 --- /dev/null +++ b/fail2ban-2to3 @@ -0,0 +1,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 |