File: src-indent.sh

package info (click to toggle)
knocker 0.7.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 488 kB
  • ctags: 296
  • sloc: ansic: 3,424; sh: 379; makefile: 43
file content (29 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

SECONDS=10

echo
echo Warning, you are about to change source code indentation !
echo executing in $SECONDS seconds, press ctrl + c to abort.

for (( i=0 ; $i <= (SECONDS=$SECONDS-1) ; i=$i+1 ))
do  
  sleep 1 
  echo -n ". "
done

echo

indent --indent-level2 --line-length140 --comment-line-length140 \
--no-blank-lines-after-declarations --no-blank-lines-after-procedures \
--dont-break-function-decl-args --dont-break-procedure-type \
-nut --space-after-if  src/*.c

# -nut = --no-tabs ( but --not-tabs is not working -nut does work ) 

echo Source code indentation complete.