mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
update identation scripts
git-svn-id: http://svn.osgeo.org/qgis/trunk@9219 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
1e4e5fab04
commit
9598429fcd
@ -1,9 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if ! astyle.sh >/dev/null 2>&1; then
|
PATH=$PATH:$(dirname $0)
|
||||||
echo astyle.sh not found in path >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#if ! qgsloggermig.pl >/dev/null 2>&1; then
|
if ! type -p astyle >/dev/null; then
|
||||||
# echo qgsloggermig.pl not found in path >&2
|
echo "astyle not found" >&2
|
||||||
# exit 1
|
exit 1
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
|
if ! type -p flip >/dev/null; then
|
||||||
|
flip() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -23,8 +29,6 @@ export ARTISTIC_STYLE_OPTIONS="\
|
|||||||
--min-conditional-indent=-1 \
|
--min-conditional-indent=-1 \
|
||||||
--suffix=none"
|
--suffix=none"
|
||||||
|
|
||||||
#--break-blocks \
|
|
||||||
|
|
||||||
export ARTISTIC_STYLE_OPTIONS="\
|
export ARTISTIC_STYLE_OPTIONS="\
|
||||||
$ARTISTIC_STYLE_OPTIONS \
|
$ARTISTIC_STYLE_OPTIONS \
|
||||||
--pad=oper \
|
--pad=oper \
|
||||||
@ -32,7 +36,12 @@ $ARTISTIC_STYLE_OPTIONS \
|
|||||||
--unpad=paren"
|
--unpad=paren"
|
||||||
|
|
||||||
for f in "$@"; do
|
for f in "$@"; do
|
||||||
#flip -ub "$f"
|
if ! [ -f "$f" ]; then
|
||||||
|
echo "$f not found" >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
flip -ub "$f"
|
||||||
#qgsloggermig.pl "$f"
|
#qgsloggermig.pl "$f"
|
||||||
astyle $ARTISTIC_STYLE_OPTIONS "$f"
|
astyle $ARTISTIC_STYLE_OPTIONS "$f"
|
||||||
done
|
done
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if ! [ -x astyle.sh ]; then
|
|
||||||
PATH=$PATH:$(dirname $0)
|
PATH=$PATH:$(dirname $0)
|
||||||
|
|
||||||
|
if ! type -p astyle.sh >/dev/null; then
|
||||||
|
echo astyle.sh not found
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! type -p colordiff >/dev/null; then
|
||||||
|
colordiff()
|
||||||
|
{
|
||||||
|
cat "$@"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if ! [ -x astyle.sh ]; then
|
|
||||||
PATH=$PATH:$(dirname $0)
|
PATH=$PATH:$(dirname $0)
|
||||||
|
|
||||||
|
if ! type -p colordiff >/dev/null; then
|
||||||
|
colordiff() {
|
||||||
|
cat "$@"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@ -23,7 +27,6 @@ echo "Checking changes between $REV0 and $REV1"
|
|||||||
ASTYLEDIFF=astyle.r$REV0-r$REV1.diff
|
ASTYLEDIFF=astyle.r$REV0-r$REV1.diff
|
||||||
>$ASTYLEDIFF
|
>$ASTYLEDIFF
|
||||||
|
|
||||||
|
|
||||||
# reformat
|
# reformat
|
||||||
for f in $MODIFIED; do
|
for f in $MODIFIED; do
|
||||||
case "$f" in
|
case "$f" in
|
||||||
@ -35,6 +38,11 @@ for f in $MODIFIED; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if ! [ -s $f ]; then
|
||||||
|
# deleted
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
m=$f.r$REV1.prepare
|
m=$f.r$REV1.prepare
|
||||||
|
|
||||||
cp $f $m
|
cp $f $m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user