mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
scripts: Speed up uncrustify by running 4 jobs in parallel
There are some large files, and in most setups (including CI runners) we have multiple cores available. Use xargs to run multiple parallel uncrustify jobs rather than one large one. Just hardcode 4 jobs and 4 files at the same time for now.
This commit is contained in:
@@ -12,8 +12,11 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
ARGS=4
|
||||
JOBS=4
|
||||
|
||||
pushd "$SRCROOT"
|
||||
uncrustify -c "$CFG" $OPTS `git ls-tree --name-only -r HEAD | grep -E '.*\.[ch]$' | grep -v nbis | grep -v fpi-byte | grep -v build/`
|
||||
git ls-tree --name-only -r HEAD | grep -E '.*\.[ch]$' | grep -v nbis | grep -v fpi-byte | grep -v build/ | xargs -n$ARGS -P $JOBS uncrustify -c "$CFG" $OPTS
|
||||
RES=$?
|
||||
popd
|
||||
exit $RES
|
||||
Reference in New Issue
Block a user