xref: /openbmc/u-boot/scripts/Lindent (revision 6defdc0b)
1*bf52b8aeSMasahiro Yamada#!/bin/sh
2*bf52b8aeSMasahiro YamadaPARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
3*bf52b8aeSMasahiro YamadaRES=`indent --version`
4*bf52b8aeSMasahiro YamadaV1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1`
5*bf52b8aeSMasahiro YamadaV2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2`
6*bf52b8aeSMasahiro YamadaV3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3`
7*bf52b8aeSMasahiro Yamadaif [ $V1 -gt 2 ]; then
8*bf52b8aeSMasahiro Yamada  PARAM="$PARAM -il0"
9*bf52b8aeSMasahiro Yamadaelif [ $V1 -eq 2 ]; then
10*bf52b8aeSMasahiro Yamada  if [ $V2 -gt 2 ]; then
11*bf52b8aeSMasahiro Yamada    PARAM="$PARAM -il0";
12*bf52b8aeSMasahiro Yamada  elif [ $V2 -eq 2 ]; then
13*bf52b8aeSMasahiro Yamada    if [ $V3 -ge 10 ]; then
14*bf52b8aeSMasahiro Yamada      PARAM="$PARAM -il0"
15*bf52b8aeSMasahiro Yamada    fi
16*bf52b8aeSMasahiro Yamada  fi
17*bf52b8aeSMasahiro Yamadafi
18*bf52b8aeSMasahiro Yamadaindent $PARAM "$@"
19