File: convert-whitespace.sh

package info (click to toggle)
colobot 0.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 415,532 kB
  • sloc: cpp: 129,246; ansic: 8,872; python: 2,158; sh: 672; awk: 91; xml: 35; makefile: 31
file content (10 lines) | stat: -rwxr-xr-x 258 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
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