2 # Run the beautifier "Uncrustify" on a single file.
3 # Because the file "uncrustify.cfg" only exists in the top level of the project
4 # you should run this script from there so this script can find your uncrustify.cfg file.
7 UNCRUSTIFYTMP
=/tmp
/uncrustify.tmp
10 if [ ! -f uncrustify.cfg
]; then
11 echo "unable to find uncrustify.cfg, aborting"
15 UNCRUSTIFYBIN
=`which uncrustify`
17 if [ "$UNCRUSTIFYBIN" = "" ]; then
18 echo "you must specify uncrustify in your PATH, I cannot find it"
23 echo "Usage $0 <filename .c or .h>"
27 uncrustify
-c uncrustify.cfg
<$1 >$UNCRUSTIFYTMP
29 # you can comment this out while tuning the uncrustify.cfg file: