From: Wolfgang Bangerth Date: Mon, 2 Mar 2015 15:06:55 +0000 (-0600) Subject: Accelerate indentation of all files from 7 to 1.1 seconds. X-Git-Tag: v8.3.0-rc1~394^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6132d9e2782454e0ed7a88631f5d3cafa3630434;p=dealii.git Accelerate indentation of all files from 7 to 1.1 seconds. --- diff --git a/contrib/utilities/indent b/contrib/utilities/indent index aa3bb296cd..bdd99afc40 100755 --- a/contrib/utilities/indent +++ b/contrib/utilities/indent @@ -1,7 +1,7 @@ #!/bin/bash ## --------------------------------------------------------------------- ## -## Copyright (C) 2012 - 2013 by the deal.II authors +## Copyright (C) 2012 - 2013, 2015 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -24,8 +24,18 @@ if test ! -f contrib/utilities/astyle.rc ; then exit fi + +# loop over all directories in which we may have source files; +# collect a list of files and then spawn a parallel process to +# indent all of them echo "--- Indenting all deal.II header and source files" -astyle --options=contrib/utilities/astyle.rc \ - include/deal.II/*/*.h \ - source/*/*.cc \ - examples/*/*.cc +for dir in include/deal.II/* source/* examples ; do + files=`find $dir | egrep '\.(cc|h)$'` ; + if test -n "$files" ; then + (astyle --options=contrib/utilities/astyle.rc $files ) & + fi +done + +# now wait for all of these processes to finish +wait +