#!/bin/sh appDir=$(cd $(dirname $0); pwd) if [ -d $appDir/src ]; then echo "\033[44;37;1mFormatting OpenCOR...\033[0m" if [ "`hash clang-format 2>&1`" = "" ]; then for i in `find $appDir/src -name "*.cpp" -o -name "*.h" | sort | egrep -v "(3rdparty|\/ext\/|\/qzip)"`; do echo "Formatting $i..." clang-format -i -style=file $i done else echo "Clang-Format is not installed." fi echo "\033[42;37;1mAll done!\033[0m" else echo "OpenCOR's source directory is missing." fi