mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
scripts: Add an uncrustify script
It currently will only uncrustify the new internal libfprint code, not the drivers or other parts.
This commit is contained in:
19
scripts/uncrustify.sh
Executable file
19
scripts/uncrustify.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
SRCROOT=`git rev-parse --show-toplevel`
|
||||
CFG="$SRCROOT/scripts/uncrustify.cfg"
|
||||
echo "srcroot: $SRCROOT"
|
||||
|
||||
case "$1" in
|
||||
-c|--check)
|
||||
OPTS="--check"
|
||||
;;
|
||||
*)
|
||||
OPTS="--replace --no-backup"
|
||||
;;
|
||||
esac
|
||||
|
||||
pushd "$SRCROOT"
|
||||
uncrustify -c "$CFG" $OPTS `git ls-tree --name-only -r HEAD | grep -E '(fp|fpi)-.*\.[ch]$' | grep -v nbis | grep -v fpi-byte | grep -v build/`
|
||||
RES=$?
|
||||
popd
|
||||
exit $RES
|
||||
Reference in New Issue
Block a user