aboutsummaryrefslogtreecommitdiffstats
path: root/indent.sh
blob: c4adcf0da3a474ed2463c2abfef7950c5ca79c96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/bash

# $Id$
# $URL$


# -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