1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-08-15 10:50:43 +03:00
Mindustry/tools/run-newline
Patrick 'Quezler' Mounier e06d8eabec
[formatting] add newline to file(s) (#1508)
* Trail appropriate files with a new line

* For some ironic reason it ignored itself

Probably because it wasn’t tracked/commited yet.

* Rename newlines to server executable naming pattern
2020-02-05 18:36:56 -05:00

15 lines
370 B
Bash
Executable File

#!/usr/bin/env bash
# add newlines to all files
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
# undo the changes in these
git checkout -- "*.png"
git checkout -- "*.msav"
git checkout -- "*.jar"
git checkout -- "*.ogg"
git checkout -- "*.ico"
git checkout -- "*.icns"
git checkout -- "*.ttf"
git checkout -- "*.glsl"