Add a script to ensure new lines exist in all files.

This commit is contained in:
Alex Zenla 2023-02-05 19:08:13 -08:00
parent 6803a456b3
commit c77e975a31
Signed by: alex
GPG Key ID: C0780728420EBFE5

10
tools/ensure-new-lines.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
git ls-files -z | while IFS= read -rd '' f
do
if file --mime-encoding "$f" | grep -qv binary
then
tail -c1 < "$f" | read -r _ || echo >> "$f"
fi
done