xref: /openbmc/linux/scripts/Lindent (revision dea54fba)
1#!/bin/sh
2
3PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
4
5RES=`indent --version | cut -d' ' -f3`
6if [ "$RES" = "" ]; then
7	exit 1
8fi
9V1=`echo $RES | cut -d'.' -f1`
10V2=`echo $RES | cut -d'.' -f2`
11V3=`echo $RES | cut -d'.' -f3`
12
13if [ $V1 -gt 2 ]; then
14  PARAM="$PARAM -il0"
15elif [ $V1 -eq 2 ]; then
16  if [ $V2 -gt 2 ]; then
17    PARAM="$PARAM -il0"
18  elif [ $V2 -eq 2 ]; then
19    if [ $V3 -ge 10 ]; then
20      PARAM="$PARAM -il0"
21    fi
22  fi
23fi
24
25indent $PARAM "$@"
26