[QGIS Commit] r12175 - trunk/qgis/scripts
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Nov 18 15:47:11 EST 2009
Author: jef
Date: 2009-11-18 15:47:09 -0500 (Wed, 18 Nov 2009)
New Revision: 12175
Modified:
trunk/qgis/scripts/update-indent.sh
Log:
update indentation script
Modified: trunk/qgis/scripts/update-indent.sh
===================================================================
--- trunk/qgis/scripts/update-indent.sh 2009-11-18 18:46:12 UTC (rev 12174)
+++ trunk/qgis/scripts/update-indent.sh 2009-11-18 20:47:09 UTC (rev 12175)
@@ -8,10 +8,21 @@
}
fi
+if ! type -p flip >/dev/null; then
+ echo flip not found
+ exit 1
+fi
+
set -e
# determine last commit
-REV0=$(svn info | sed -ne "s/Revision: //p")
+if [ -f .lastcommit ]; then
+ REV0=$(<.lastcommit)
+ svn revert -R .
+ svn update -r$REV0
+else
+ REV0=$(svn info | sed -ne "s/Revision: //p")
+fi
# update
MODIFIED=$(svn update | sed -ne "s/^[^ ]* *//p")
@@ -30,11 +41,22 @@
# reformat
for f in $MODIFIED; do
case "$f" in
+ src/core/spatialite/*)
+ echo $f skipped
+ continue
+ ;;
+
*.cpp|*.h|*.c|*.h|*.cxx|*.hxx|*.c++|*.h++|*.cc|*.hh|*.C|*.H)
+ cmd=astyle.sh
;;
+ *.ui|*.qgm|*.txt|*.t2t|*.py|*.sip|resources/context_help/*)
+ cmd="flip -ub"
+ ;;
+
*)
- continue
+ echo $f skipped
+ continue
;;
esac
@@ -46,7 +68,7 @@
m=$f.r$REV1.prepare
cp $f $m
- astyle.sh $f
+ $cmd $f
if diff -u $m $f >>$ASTYLEDIFF; then
# no difference found
rm $m
@@ -62,7 +84,8 @@
fi
# just echo for now
- echo svn commit -m "automatic indentation update (r$REV0-r$REV1)"
+ echo "svn commit -m \"automatic indentation update (r$REV0-r$REV1)\""
+ echo $REV1 >.lastcommit
else
echo "No indentation updates."
rm $ASTYLEDIFF
More information about the QGIS-commit
mailing list