source: flair-src/trunk/scripts/flair_format_dir.sh@ 466

Last change on this file since 466 was 302, checked in by Sanahuja Guillaume, 6 years ago

modifs nouveau build system

  • Property svn:executable set to *
File size: 412 bytes
RevLine 
[302]1#! /bin/sh
2DIR=$1
3if [ ! -d $DIR ]; then
4 echo "Directory $DIR not found"
5 exit 1
6fi
7CLANG_FORMAT_CMD=$(locate --regex /clang-format$)
8if [ $? -ne 0 ]; then
9 echo "clang-format command not found. Please install it before running this script."
10 exit 2
11else
12 echo "clang-format binary used is $CLANG_FORMAT_CMD"
13fi
14
15find $DIR \( -name '*.h' -o -name '*.cpp' \) -execdir $CLANG_FORMAT_CMD -style=llvm -i {} +
16
Note: See TracBrowser for help on using the repository browser.