mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
scripts: Add uncrustify scripts for reformatting fprintd source code
We follow libfprint here, using GNOME format
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 '.*\.[ch]$' | grep -v build/`
|
||||
RES=$?
|
||||
popd
|
||||
exit $RES
|
||||
Reference in New Issue
Block a user