Skip to content
Snippets Groups Projects
Commit 66ed7f24 authored by Andrew Cooks's avatar Andrew Cooks
Browse files

run Lindent at the start of cleanup as well.

Lindent needs to be run at the start of the cleanup process, so that the
format is known and consistent, before the regex transformations are applied.
parent b95fd63a
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,17 @@
set -e
# Use the kernel's scripts/Lindent utility
if [ -z "$LINDENT" -o ! -x "$LINDENT" ] ; then
echo " You need to set the LINDENT environment variable to specify where the Lindent script is (Hint: in the kernel sources at scripts/Lindent)"
exit 1
fi
# Run Lindent at the start of cleanup, so that the regexes below are applied to
# a predictable style of code.
# Run Lindent twice, because the operation is unfortunately not idempotent
# after only a single run (but is after two runs).
${LINDENT} *.c *.h ; ${LINDENT} *.c *.h
# Trim trailing whitespace
sed -i 's|\s*$||g' *.c *.h
......@@ -65,12 +76,7 @@ sed -i 's|\(#define DBG1.*\)||g' tn40.h
# Insert new cleanup steps above this comment.
# Keep Lindent as the last step.
# Use the kernel's scripts/Lindent utility
if [ -z "$LINDENT" -o ! -x "$LINDENT" ] ; then
echo " You need to set the LINDENT environment variable to specify where the Lindent script is (Hint: in the kernel sources at scripts/Lindent)"
exit 1
fi
# Run Lindent again at the end, because the regexes above affect the format.
# Run Lindent twice, because the operation is unfortunately not idempotent
# after only a single run (but is after two runs).
${LINDENT} *.c *.h ; ${LINDENT} *.c *.h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment