File: indent.sh

package info (click to toggle)
lcd4linux 0.10.0%2Bcvs20060825-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,248 kB
  • ctags: 2,061
  • sloc: ansic: 21,777; sh: 3,610; makefile: 197; perl: 33
file content (15 lines) | stat: -rwxr-xr-x 256 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/bash

# -kr    Use Kernighan & Ritchie coding style.
# -l120  Set maximum line length for non-comment lines to 150.

rm *.c~ *.h~
indent -kr -l120 *.c *.h

for i in *.c *.h; do
  if !(diff -q $i $i~); then
    rm $i~
  else
    mv $i~ $i
  fi
done