aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-03-09 10:52:13 +0000
committerng0 <ng0@n0.is>2019-03-09 10:52:13 +0000
commitdd053261910f644de496039130bf5860b43f64c8 (patch)
treecdbc03b9ebf610344b7d4733788ab8ba49984e9e /contrib
parent40a0a0bdb635d2c6c9a13f3d01b3b6b6f8f39e9e (diff)
downloadgnunet-dd053261910f644de496039130bf5860b43f64c8.tar.gz
gnunet-dd053261910f644de496039130bf5860b43f64c8.zip
drop python-lint.log in lint
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/scripts/lint-python.sh50
1 files changed, 26 insertions, 24 deletions
diff --git a/contrib/scripts/lint-python.sh b/contrib/scripts/lint-python.sh
index 3325460f6..cf737cae2 100755
--- a/contrib/scripts/lint-python.sh
+++ b/contrib/scripts/lint-python.sh
@@ -10,67 +10,69 @@ existence()
10 command -v "$1" >/dev/null 2>&1 10 command -v "$1" >/dev/null 2>&1
11} 11}
12 12
13LOGFILE="lint/python-lint.log"
14
13# invoke from root of source! 15# invoke from root of source!
14if [ $(basename $(pwd)) = "scripts" ] 16if [ $(basename $(pwd)) = "scripts" ]
15then 17then
16 return 1 18 return 1
17else 19else
18 if [ -e "python-lint.log" ] 20 if [ -e "${LOGFILE}" ]
19 then 21 then
20 rm "python-lint.log" 22 rm ${LOGFILE}
21 fi 23 fi
22 24
23 if existence python; 25 if existence python;
24 then 26 then
25 python --version >> python-lint.log 27 python --version >> ${LOGFILE}
26 fi 28 fi
27 29
28 if existence python2; 30 if existence python2;
29 then 31 then
30 python2 --version >> python-lint.log 32 python2 --version >> ${LOGFILE}
31 fi 33 fi
32 34
33 if existence python3; 35 if existence python3;
34 then 36 then
35 python3 --version >> python-lint.log 37 python3 --version >> ${LOGFILE}
36 fi 38 fi
37 39
38 if existence python3.7; 40 if existence python3.7;
39 then 41 then
40 python3.7 --version >> python-lint.log 42 python3.7 --version >> ${LOGFILE}
41 fi 43 fi
42 44
43 if existence flake8; 45 if existence flake8;
44 then 46 then
45 echo >> python-lint.log 47 echo >> ${LOGFILE}
46 echo "flake8:" >> python-lint.log 48 echo "flake8:" >> ${LOGFILE}
47 echo >> python-lint.log 49 echo >> ${LOGFILE}
48 flake8 >> python-lint.log 50 flake8 >> ${LOGFILE}
49 fi 51 fi
50 52
51 if existence flake8-3.7; 53 if existence flake8-3.7;
52 then 54 then
53 echo >> python-lint.log 55 echo >> ${LOGFILE}
54 echo "flake8:" >> python-lint.log 56 echo "flake8:" >> ${LOGFILE}
55 echo >> python-lint.log 57 echo >> ${LOGFILE}
56 flake8-3.7 >> python-lint.log 58 flake8-3.7 >> ${LOGFILE}
57 fi 59 fi
58 60
59 if existence 2to3; 61 if existence 2to3;
60 then 62 then
61 echo >> python-lint.log 63 echo >> ${LOGFILE}
62 echo "2to3" >> python-lint.log 64 echo "2to3" >> ${LOGFILE}
63 echo >> python-lint.log 65 echo >> ${LOGFILE}
64 2to3 -v -d . >> python-lint.log 66 2to3 -v -d . >> ${LOGFILE}
65 2to3 -v -p . >> python-lint.log 67 2to3 -v -p . >> ${LOGFILE}
66 fi 68 fi
67 69
68 if existence 2to3-3.7; 70 if existence 2to3-3.7;
69 then 71 then
70 echo >> python-lint.log 72 echo >> ${LOGFILE}
71 echo "2to3" >> python-lint.log 73 echo "2to3" >> ${LOGFILE}
72 echo >> python-lint.log 74 echo >> ${LOGFILE}
73 2to3-3.7 -v -d . >> python-lint.log 75 2to3-3.7 -v -d . >> ${LOGFILE}
74 2to3-3.7 -v -p . >> python-lint.log 76 2to3-3.7 -v -p . >> ${LOGFILE}
75 fi 77 fi
76fi 78fi