mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Add script to unify card file format (\n as linebreak, always trailing newline).
This commit is contained in:
11
forge-gui/tools/formatCards
Executable file
11
forge-gui/tools/formatCards
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
CARDSFOLDER="../res/cardsfolder/"
|
||||
|
||||
for d in `ls -1 "$CARDSFOLDER"`; do
|
||||
for f in `ls -1 "$CARDSFOLDER/$d"`; do
|
||||
FILE="$CARDSFOLDER/$d/$f";
|
||||
dos2unix "$FILE";
|
||||
[[ -f "$FILE" && $(tail -c1 "$FILE") ]] && echo '' >> "$FILE" && echo "Appended trailing newline to $FILE";
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user