source: flair-src/branches/sanscv/scripts/flair_format_dir.sh@ 411

Last change on this file since 411 was 324, checked in by Sanahuja Guillaume, 5 years ago

removing opencv dependency

  • Property svn:executable set to *
File size: 412 bytes
Line 
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.