#!/usr/bin/env bash
shopt -s globstar
if (( $# > 0 )); then
printf "formatting file(s) $*"
echo
clang-format -i -style=file "$@"
echo done.
exit
fi
echo formatting...
clang-format -i -style=file src/**/*.c
clang-format -i -style=file lib/src/*.c
clang-format -i -style=file enhancements/*.inc.c
echo done.