xref: /openbmc/linux/scripts/Lindent (revision ee8900c9c7cc92db02b7edfa26ae3b2c9b2434f9)
11da177e4SLinus Torvalds#!/bin/sh
2*ee8900c9SJoe PerchesPARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
3*ee8900c9SJoe PerchesRES=`indent --version`
4*ee8900c9SJoe PerchesV1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1`
5*ee8900c9SJoe PerchesV2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2`
6*ee8900c9SJoe PerchesV3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3`
7*ee8900c9SJoe Perchesif [ $V1 -gt 2 ]; then
8*ee8900c9SJoe Perches  PARAM="$PARAM -il0"
9*ee8900c9SJoe Percheselif [ $V1 -eq 2 ]; then
10*ee8900c9SJoe Perches  if [ $V2 -gt 2 ]; then
11*ee8900c9SJoe Perches    PARAM="$PARAM -il0";
12*ee8900c9SJoe Perches  elif [ $V2 -eq 2 ]; then
13*ee8900c9SJoe Perches    if [ $V3 -ge 10 ]; then
14*ee8900c9SJoe Perches      PARAM="$PARAM -il0"
15*ee8900c9SJoe Perches    fi
16*ee8900c9SJoe Perches  fi
17*ee8900c9SJoe Perchesfi
18*ee8900c9SJoe Perchesindent $PARAM "$@"
19