mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-02 13:10:55 +00:00
Add a script to ensure new lines exist in all files.
This commit is contained in:
parent
6803a456b3
commit
c77e975a31
10
tools/ensure-new-lines.sh
Executable file
10
tools/ensure-new-lines.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user