xref: /OK3568_Linux_fs/device/rockchip/common/linux-kbuild/aarch64/linux-kbuild-4.4/scripts/Lindent (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/bin/sh
2*4882a593SmuzhiyunPARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
3*4882a593SmuzhiyunRES=`indent --version`
4*4882a593Smuzhiyunif [ "$RES" = "" ]; then
5*4882a593Smuzhiyun	exit 1
6*4882a593Smuzhiyunfi
7*4882a593SmuzhiyunV1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1`
8*4882a593SmuzhiyunV2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2`
9*4882a593SmuzhiyunV3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3`
10*4882a593Smuzhiyunif [ $V1 -gt 2 ]; then
11*4882a593Smuzhiyun  PARAM="$PARAM -il0"
12*4882a593Smuzhiyunelif [ $V1 -eq 2 ]; then
13*4882a593Smuzhiyun  if [ $V2 -gt 2 ]; then
14*4882a593Smuzhiyun    PARAM="$PARAM -il0";
15*4882a593Smuzhiyun  elif [ $V2 -eq 2 ]; then
16*4882a593Smuzhiyun    if [ $V3 -ge 10 ]; then
17*4882a593Smuzhiyun      PARAM="$PARAM -il0"
18*4882a593Smuzhiyun    fi
19*4882a593Smuzhiyun  fi
20*4882a593Smuzhiyunfi
21*4882a593Smuzhiyunindent $PARAM "$@"
22