blob: 57b564c24d61dd42b96e2844312202ce882aa3de [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/sh
Jean Delvare78c52502017-02-22 15:40:20 -08002
Joe Perchesee8900c2008-04-29 00:59:31 -07003PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
Jean Delvare78c52502017-02-22 15:40:20 -08004
5RES=`indent --version | cut -d' ' -f3`
Jean Delvarefa709002015-09-04 15:43:24 -07006if [ "$RES" = "" ]; then
7 exit 1
8fi
Jean Delvare78c52502017-02-22 15:40:20 -08009V1=`echo $RES | cut -d'.' -f1`
10V2=`echo $RES | cut -d'.' -f2`
11V3=`echo $RES | cut -d'.' -f3`
12
Joe Perchesee8900c2008-04-29 00:59:31 -070013if [ $V1 -gt 2 ]; then
14 PARAM="$PARAM -il0"
15elif [ $V1 -eq 2 ]; then
16 if [ $V2 -gt 2 ]; then
Jean Delvare78c52502017-02-22 15:40:20 -080017 PARAM="$PARAM -il0"
Joe Perchesee8900c2008-04-29 00:59:31 -070018 elif [ $V2 -eq 2 ]; then
19 if [ $V3 -ge 10 ]; then
20 PARAM="$PARAM -il0"
21 fi
22 fi
23fi
Jean Delvare78c52502017-02-22 15:40:20 -080024
Joe Perchesee8900c2008-04-29 00:59:31 -070025indent $PARAM "$@"