blob: 1688c44c2df6f5a717550d65a410545434c83b4f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Jean Delvare78c52502017-02-22 15:40:20 -08003
Joe Perchesee8900c2008-04-29 00:59:31 -07004PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
Jean Delvare78c52502017-02-22 15:40:20 -08005
6RES=`indent --version | cut -d' ' -f3`
Jean Delvarefa709002015-09-04 15:43:24 -07007if [ "$RES" = "" ]; then
8 exit 1
9fi
Jean Delvare78c52502017-02-22 15:40:20 -080010V1=`echo $RES | cut -d'.' -f1`
11V2=`echo $RES | cut -d'.' -f2`
12V3=`echo $RES | cut -d'.' -f3`
13
Joe Perchesee8900c2008-04-29 00:59:31 -070014if [ $V1 -gt 2 ]; then
15 PARAM="$PARAM -il0"
16elif [ $V1 -eq 2 ]; then
17 if [ $V2 -gt 2 ]; then
Jean Delvare78c52502017-02-22 15:40:20 -080018 PARAM="$PARAM -il0"
Joe Perchesee8900c2008-04-29 00:59:31 -070019 elif [ $V2 -eq 2 ]; then
20 if [ $V3 -ge 10 ]; then
21 PARAM="$PARAM -il0"
22 fi
23 fi
24fi
Jean Delvare78c52502017-02-22 15:40:20 -080025
Joe Perchesee8900c2008-04-29 00:59:31 -070026indent $PARAM "$@"