[785c03]: reindent.sh  Maximize  Restore  History

Download this file

29 lines (23 with data), 574 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /bin/sh
WRKDIR=$(dirname $0)
SRCDIRS="$WRKDIR/src $WRKDIR/plugins $WRKDIR/renderer $WRKDIR/thumbnailer"
if [ $# -gt 0 ]
then
FILES=$@
else
FILES=$(find $SRCDIRS -type f -name \*.cpp -o -name \*.h)
fi
astyle --indent=spaces=4 --brackets=linux \
--indent-labels --unpad=paren \
--pad=oper --convert-tabs \
--indent-preprocessor \
${FILES}
echo -n "Delete .orig files (y/N) ? "
read del
if [ "x${del}" = "xy" ]
then
echo "removing .orig files"
find $SRCDIRS -iname "*.orig" -exec rm {} ";"
else
echo "Not deleting .orig files"
fi

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks