forked from lda/telodendria
Verbose formatting on the terminal, because why not?
This commit is contained in:
parent
a4364dbb68
commit
9186cdb13d
1 changed files with 6 additions and 0 deletions
|
@ -137,6 +137,9 @@ recipe_clean() {
|
||||||
# then running indent(1) on each source code file.
|
# then running indent(1) on each source code file.
|
||||||
recipe_format() {
|
recipe_format() {
|
||||||
find src -name '*.c' -or -name '*.h' | while IFS= read -r src; do
|
find src -name '*.c' -or -name '*.h' | while IFS= read -r src; do
|
||||||
|
if [ -t 1 ]; then
|
||||||
|
printf "FMT %s%*c\r" $(basename "$src") "16" " "
|
||||||
|
fi
|
||||||
# Update the headers
|
# Update the headers
|
||||||
srcHeader=$(grep -n -m 1 '^ \*/' "$src" | cut -d ':' -f 1)
|
srcHeader=$(grep -n -m 1 '^ \*/' "$src" | cut -d ':' -f 1)
|
||||||
head "-n$srcHeader" "$src" |
|
head "-n$srcHeader" "$src" |
|
||||||
|
@ -148,6 +151,9 @@ recipe_format() {
|
||||||
rm $(basename "$src").BAK
|
rm $(basename "$src").BAK
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
if [ -t 1 ]; then
|
||||||
|
printf "%*c\n" "50" " "
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Deploy the Telodendria website by copying the required files to
|
# Deploy the Telodendria website by copying the required files to
|
||||||
|
|
Loading…
Reference in a new issue