Skip to content

Commit

Permalink
update update-indent.sh
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15229 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 20, 2011
1 parent 97c9740 commit 8f24123
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/update-indent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ set -e
if [ -f .lastcommit ]; then
REV0=$(<.lastcommit)
svn revert -R .
find . -name "*.prepare" -delete
svn update -r$REV0
else
REV0=$(svn info | sed -ne "s/Revision: //p")
fi

# update
MODIFIED=$(svn update | sed -ne "s/^[^ ]* *//p")
MODIFIED=$(svn update | sed -ne "s/^[^ ]. *//p")
REV1=$(svn info | sed -ne "s/Revision: //p")

if [ "$REV0" -eq "$REV1" ]; then
Expand All @@ -41,7 +42,7 @@ ASTYLEDIFF=astyle.r$REV0-r$REV1.diff
# reformat
for f in $MODIFIED; do
case "$f" in
src/core/spatialite/*)
src/core/spatialite/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
echo $f skipped
continue
;;
Expand Down Expand Up @@ -85,6 +86,7 @@ if [ -s "$ASTYLEDIFF" ]; then

# just echo for now
echo "svn commit -m \"automatic indentation update (r$REV0-r$REV1)\""
[ -f .lastcommit ] && mv .lastcommit .prevcommit
echo $REV1 >.lastcommit
else
echo "No indentation updates."
Expand Down

0 comments on commit 8f24123

Please sign in to comment.