Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #!/bin/sh |
Jean Delvare | 78c5250 | 2017-02-22 15:40:20 -0800 | [diff] [blame^] | 2 | |
Joe Perches | ee8900c | 2008-04-29 00:59:31 -0700 | [diff] [blame] | 3 | PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1" |
Jean Delvare | 78c5250 | 2017-02-22 15:40:20 -0800 | [diff] [blame^] | 4 | |
5 | RES=`indent --version | cut -d' ' -f3` | ||||
Jean Delvare | fa70900 | 2015-09-04 15:43:24 -0700 | [diff] [blame] | 6 | if [ "$RES" = "" ]; then |
7 | exit 1 | ||||
8 | fi | ||||
Jean Delvare | 78c5250 | 2017-02-22 15:40:20 -0800 | [diff] [blame^] | 9 | V1=`echo $RES | cut -d'.' -f1` |
10 | V2=`echo $RES | cut -d'.' -f2` | ||||
11 | V3=`echo $RES | cut -d'.' -f3` | ||||
12 | |||||
Joe Perches | ee8900c | 2008-04-29 00:59:31 -0700 | [diff] [blame] | 13 | if [ $V1 -gt 2 ]; then |
14 | PARAM="$PARAM -il0" | ||||
15 | elif [ $V1 -eq 2 ]; then | ||||
16 | if [ $V2 -gt 2 ]; then | ||||
Jean Delvare | 78c5250 | 2017-02-22 15:40:20 -0800 | [diff] [blame^] | 17 | PARAM="$PARAM -il0" |
Joe Perches | ee8900c | 2008-04-29 00:59:31 -0700 | [diff] [blame] | 18 | elif [ $V2 -eq 2 ]; then |
19 | if [ $V3 -ge 10 ]; then | ||||
20 | PARAM="$PARAM -il0" | ||||
21 | fi | ||||
22 | fi | ||||
23 | fi | ||||
Jean Delvare | 78c5250 | 2017-02-22 15:40:20 -0800 | [diff] [blame^] | 24 | |
Joe Perches | ee8900c | 2008-04-29 00:59:31 -0700 | [diff] [blame] | 25 | indent $PARAM "$@" |