diff options
Diffstat (limited to 'tools/convert-whitespace.sh')
-rwxr-xr-x | tools/convert-whitespace.sh | 10 |
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 |