apio
a164dcc160
All checks were successful
continuous-integration/drone/push Build is passing
libluna but for stuff that interests only userspace, like an argument parser or files or stuff like that.
33 lines
559 B
Bash
Executable File
33 lines
559 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source $(dirname $0)/env.sh
|
|
|
|
cd $LUNA_ROOT
|
|
|
|
SOURCES=($(find kernel/src -type f | grep -v "\.asm"))
|
|
SOURCES+=($(find libluna/src -type f))
|
|
SOURCES+=($(find libluna/include/luna -type f))
|
|
SOURCES+=($(find libos/src -type f))
|
|
SOURCES+=($(find libos/include/os -type f))
|
|
|
|
ALL_OK=1
|
|
|
|
for f in ${SOURCES[@]}
|
|
do
|
|
clang-format -n $f 2>&1 | grep -q ^
|
|
RESULT=$?
|
|
if [ "$RESULT" -eq "0" ]
|
|
then
|
|
echo "File $f needs formatting"
|
|
ALL_OK=0
|
|
fi
|
|
done
|
|
|
|
if [ $ALL_OK = "1" ]
|
|
then
|
|
echo "All files OK"
|
|
exit 0
|
|
fi
|
|
|
|
exit 1
|