mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
23 lines
522 B
Bash
Executable file
23 lines
522 B
Bash
Executable file
#!/bin/sh
|
|
|
|
main() {
|
|
if [ $# -lt 2 ]; then
|
|
echo "$0 [build_path] [-fix] DIR..." 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
args="-p $1"; shift
|
|
|
|
if [ "$1" = "-fix" ]; then
|
|
args="${args} -fix"; shift
|
|
fi
|
|
|
|
# shellcheck disable=2086
|
|
find "${@:-.}" -regex ".*.[c|h]pp" \
|
|
-exec printf "\033[32;1m** \033[0mProcessing %s\n" {} \; \
|
|
-exec clang-tidy $args {} \; \
|
|
-exec printf "\033[32;1m** \033[0mFormatting %s\n" {} \; \
|
|
-exec clang-format -style=file -i {} \;
|
|
}
|
|
|
|
main "$@"
|