[mousetrap/ng] run_pylint.sh fixed
- From: Flavio Percoco <flaper src gnome org>
- To: svn-commits-list gnome org
- Subject: [mousetrap/ng] run_pylint.sh fixed
- Date: Sun, 10 May 2009 08:51:02 -0400 (EDT)
commit b8563e30a6ca27cd8c4e239cf178766b432ab428
Author: Flavio Percoco Premoli <flaper87 gmail com>
Date: Sat May 9 23:35:04 2009 +0200
run_pylint.sh fixed
---
configure.in | 1 +
po/es.mo | Bin 3486 -> 3486 bytes
po/fr.mo | Bin 470 -> 470 bytes
po/it.mo | Bin 3535 -> 3535 bytes
run_pylint.sh.in | 17 ++++++++++++-----
5 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/configure.in b/configure.in
index 1cd860b..78a47ef 100755
--- a/configure.in
+++ b/configure.in
@@ -72,6 +72,7 @@ DOCBOOK_CHECK()
AC_OUTPUT([
Makefile
mousetrap.desktop
+run_pylint.sh
po/Makefile.in
docs/Makefile
docs/man/Makefile
diff --git a/po/LINGUAS b/po/LINGUAS
old mode 100755
new mode 100644
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
old mode 100755
new mode 100644
diff --git a/po/POTFILES b/po/POTFILES
old mode 100755
new mode 100644
diff --git a/po/POTFILES.in b/po/POTFILES.in
old mode 100755
new mode 100644
diff --git a/po/es.mo b/po/es.mo
old mode 100755
new mode 100644
diff --git a/po/es.po b/po/es.po
old mode 100755
new mode 100644
diff --git a/po/fr.mo b/po/fr.mo
old mode 100755
new mode 100644
diff --git a/po/fr.po b/po/fr.po
old mode 100755
new mode 100644
diff --git a/po/it.mo b/po/it.mo
old mode 100755
new mode 100644
diff --git a/po/it.po b/po/it.po
old mode 100755
new mode 100644
diff --git a/run_pylint.sh.in b/run_pylint.sh.in
index fbcb32a..dd7dc6d 100755
--- a/run_pylint.sh.in
+++ b/run_pylint.sh.in
@@ -1,17 +1,24 @@
#!/bin/bash
#
-# Script to run pylint on the mouseTrap sources you've modified or added.
-# See http://live.gnome.org/mouseTrap/Pylint for more info.
+# SCRIPT TAKEN FROM ORCA PROJECT
+#
+# Script to run pylint on the MouseTrap sources you've modified or added.
+# See http://live.gnome.org/MouseTrap/Pylint for more info.
#
exec_prefix= prefix@
INSTALL_DIR= pyexecdir@
if [ "x$*" == "x" ]
then
- FILES=`svn stat src/mouseTrap | egrep "^M|^A" | grep "[.]py$" | awk '{ print $2 }'`
+ if [ -d .git ]
+ then
+ FILES=`git status | egrep 'modified:|new file:' | grep '[.]py$' | awk '{ print $NF }'`
+ else if [ -d .svn ]
+ FILES=`svn stat src/mouseTrap | egrep "^M|^A" | grep "[.]py$" | awk '{ print $2 }'`
+ fi
else
FILES="$*"
fi
-FILES=`echo $FILES | sed 's^src/mouseTrap/^^g'`
+FILES=`echo $FILES | sed 's^src/mousetrap/^^g'`
echo Thank you for your attention to quality
for foo in $FILES
do
@@ -19,7 +26,7 @@ do
OUTPUT_FILE=`dirname $foo`/`basename $foo .py`.pylint
OUTPUT_FILE=`echo $OUTPUT_FILE | sed 's~^./~~' | sed 's^/^.^g'`
echo Checking $foo, sending output to $OUTPUT_FILE
- PYTHONPATH=$INSTALL_DIR:$PYTHONPATH pylint --init-hook="import pyatspi" $INSTALL_DIR/mouseTrap/$foo > $OUTPUT_FILE 2>&1
+ PYTHONPATH=$INSTALL_DIR:$PYTHONPATH pylint --init-hook="import pyatspi" $INSTALL_DIR/mousetrap/$foo > $OUTPUT_FILE 2>&1
grep "code has been rated" $OUTPUT_FILE | cut -f1 -d\( \
| sed "s/.pylint:Your code has been rated at / /" \
| sed "s^/10^^" | sort -n -k 2,2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]