add basic script to check convention and auto indent

This commit is contained in:
rick 2023-01-30 02:04:35 +01:00
parent 2fca35a3d5
commit 187e5f5d7b
Signed by: Rick
GPG key ID: 4A6223D66294EB20

14
check.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
if [[ $# -eq 0 ]]
then
echo "usage: $0 [-i] <fichier>"
echo ""
echo -e "-i\tindente le fichier"
exit 0
fi
file=${@:$#}
[[ $1 =~ "-i" ]] && indent -linux $file
/usr/src/linux/scripts/checkpatch.pl -f --no-tree --strict $file