~siretart/lcd4linux/debian

« back to all changes in this revision

Viewing changes to indent.sh

  • Committer: Reinhard Tartler
  • Date: 2011-04-27 17:24:15 UTC
  • mto: This revision was merged to the branch mainline in revision 750.
  • Revision ID: siretart@tauware.de-20110427172415-6n4aptmvmz0eztvm
Tags: upstream-0.11.0~svn1143
Import upstream version 0.11.0~svn1143

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
 
 
3
# $Id: indent.sh 1136 2010-11-28 16:07:16Z mzuther $
 
4
# $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/indent.sh $
 
5
 
 
6
 
 
7
# -kr    Use Kernighan & Ritchie coding style.
 
8
# -l120  Set maximum line length for non-comment lines to 150.
 
9
# -npro  Do not read ‘.indent.pro’ files.
 
10
 
 
11
rm *.c~ *.h~ 2>/dev/null  # trash "no such file or directory" warning messages 
 
12
indent -kr -l120 -npro *.c *.h
 
13
 
 
14
for i in *.c *.h; do
 
15
  if !(diff -q $i $i~); then
 
16
    rm $i~
 
17
  else
 
18
    mv $i~ $i
 
19
  fi
 
20
done