source: trunk/Clp/src/format-source.sh @ 2470

Last change on this file since 2470 was 2385, checked in by unxusr, 10 months ago

formatting

  • Property svn:executable set to *
File size: 519 bytes
Line 
1# script to format source code and include (if not included yet),
2# vim formatting settings (which are automatically loaded by vim)
3# Haroldo - 2019
4
5for file in *.[ch]pp *.h;
6do
7    sourceName=`basename $file`
8    echo formatting "$sourceName"
9    clang-format -i -style=file $file
10
11    # adding vim modeline if not included yet
12    if ! grep -q "/* vi: softtabstop=" $file; then
13      echo '' >> $file
14      echo  '/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2' >> $file
15      echo  '*/' >> $file
16    fi
17done
Note: See TracBrowser for help on using the repository browser.