summaryrefslogtreecommitdiffstats
path: root/tools/convert-whitespace.sh
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-26 22:23:05 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-26 22:23:05 +0200
commitebed57aa22b772211387a5561f995eee8f5faed1 (patch)
tree9a0b08371df54c125957e63c7ecff81c001d4eaf /tools/convert-whitespace.sh
parentfc5389d18816799ba2698914384cd099ba8a7a6c (diff)
downloadcolobot-ebed57aa22b772211387a5561f995eee8f5faed1.tar.gz
colobot-ebed57aa22b772211387a5561f995eee8f5faed1.tar.bz2
colobot-ebed57aa22b772211387a5561f995eee8f5faed1.zip
Whitespace and language change
- changed tabs to spaces and DOS line endings to Unix (except in CBot and metafile) - changed language to English - fixed #include <d3d.h> in d3dengine.h
Diffstat (limited to 'tools/convert-whitespace.sh')
-rwxr-xr-xtools/convert-whitespace.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/convert-whitespace.sh b/tools/convert-whitespace.sh
new file mode 100755
index 0000000..6f844ad
--- /dev/null
+++ b/tools/convert-whitespace.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# A script for converting whitespace from old format to new
+# For each argument, replaces tabs with 4 spaces and DOS line endings to UNIX
+
+for file in "$@"; do
+ dos2unix "$file"
+ expand -t 4 "$file" > "$file.out"
+ mv -f "$file.out" "$file"
+done