1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-09 01:07:16 +01:00
SqMod/module/Vendor/MaxmindDB/dev-bin/uncrustify-all.sh

20 lines
552 B
Bash
Raw Normal View History

2020-03-22 15:33:48 +01:00
#!/bin/sh
uncrustify="uncrustify -c .uncrustify.cfg --replace --no-backup"
# We indent each thing twice because uncrustify is not idempotent - in some
# cases it will flip-flop between two indentation styles.
for dir in bin include src t; do
c_files=`find $dir -maxdepth 1 -name '*.c'`
if [ "$c_files" != "" ]; then
$uncrustify $dir/*.c;
$uncrustify $dir/*.c;
fi
h_files=`find $dir -maxdepth 1 -name '*.h'`
if [ "$h_files" != "" ]; then
$uncrustify $dir/*.h;
$uncrustify $dir/*.h;
fi
done