diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-04-27 19:24:15 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-04-27 19:24:15 +0200 |
commit | 181cec4348da40331b3e8ab365732c025ec149b2 (patch) | |
tree | e2e749be67c8253a8096aaf92aab9c51f1a17f7f /indent.sh | |
download | lcd4linux-181cec4348da40331b3e8ab365732c025ec149b2.tar.gz |
Import upstream version 0.11.0~svn1143
Diffstat (limited to 'indent.sh')
-rwxr-xr-x | indent.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indent.sh b/indent.sh new file mode 100755 index 0000000..012434e --- /dev/null +++ b/indent.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +# $Id: indent.sh 1136 2010-11-28 16:07:16Z mzuther $ +# $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/indent.sh $ + + +# -kr Use Kernighan & Ritchie coding style. +# -l120 Set maximum line length for non-comment lines to 150. +# -npro Do not read ‘.indent.pro’ files. + +rm *.c~ *.h~ 2>/dev/null # trash "no such file or directory" warning messages +indent -kr -l120 -npro *.c *.h + +for i in *.c *.h; do + if !(diff -q $i $i~); then + rm $i~ + else + mv $i~ $i + fi +done |