2019-08-25 13:40:22 +02:00
|
|
|
#!/usr/bin/env bash
|
2019-08-25 16:12:48 +02:00
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2019-08-25 13:40:22 +02:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
2019-08-25 16:12:48 +02:00
|
|
|
|
|
|
|
if ! uncrustify --version >/dev/null; then
|
|
|
|
echo "you need to install uncrustify for indentation"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-10-01 23:06:24 +02:00
|
|
|
find "$DIR/../src" \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) \
|
2019-08-25 16:12:48 +02:00
|
|
|
-exec uncrustify -c "$DIR/uncrustify.cfg" --replace --no-backup {} + \
|
|
|
|
|| true
|