]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not use 'xargs' with locally defined functions. 2988/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 18 Aug 2016 21:13:07 +0000 (15:13 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 18 Aug 2016 21:13:07 +0000 (15:13 -0600)
This breaks some versions of 'bash'. Rather, just run the function on each
individual file -- they are not too many anyway, and should indent rather
quickly.

contrib/utilities/indent

index c9527da11302431b36c303dc12d605c4af37dc72..b22a3bac58521e5c6c929c2e20e4641cab30909a 100755 (executable)
@@ -62,5 +62,6 @@ format_inst()
     rm $f.tmp $f.tmp.orig
 }
 
-export -f format_inst
-find source -name '*.inst.in' | xargs -n 1 -P 10 -I % bash -c 'format_inst "$@"' _ %
+for i in `find source -name '*.inst.in'` ; do
+  format_inst $i
+done

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.