From ebed57aa22b772211387a5561f995eee8f5faed1 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Tue, 26 Jun 2012 22:23:05 +0200 Subject: 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 in d3dengine.h --- tools/README.txt | 4 ++++ tools/convert-whitespace.sh | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tools/README.txt create mode 100755 tools/convert-whitespace.sh (limited to 'tools') 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 -- cgit v1.2.3-1-g7c22