diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-26 22:37:26 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-26 22:37:26 +0200 |
commit | 6a059b437dca706a72233a57ba4c22011aba6dde (patch) | |
tree | 4d4bbef5e19bbde38ccd173c661377cdc9167ba7 /tools | |
parent | b696edaed3e21839315d639590402e22f90fe195 (diff) | |
parent | bf06998ece3ba9d47b595e3761beba54b3793036 (diff) | |
download | colobot-6a059b437dca706a72233a57ba4c22011aba6dde.tar.gz colobot-6a059b437dca706a72233a57ba4c22011aba6dde.tar.bz2 colobot-6a059b437dca706a72233a57ba4c22011aba6dde.zip |
Merge branch 'dev-opengl' into dev
Diffstat (limited to 'tools')
-rw-r--r-- | tools/README.txt | 4 | ||||
-rwxr-xr-x | tools/convert-whitespace.sh | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tools/README.txt b/tools/README.txt new file mode 100644 index 0000000..89d5b9c --- /dev/null +++ b/tools/README.txt @@ -0,0 +1,4 @@ +tools/ + +This directory contains useful scripts for changing many files at once, +for example replacing string occurences or converting whitespace. 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 |