X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=scripts%2FLindent;h=9c4b3e2b7098a9d2af14c50614189c9a28cd689b;hb=1c32fd0c5ac1ccbdc37a1a392a5d75cbe059b401;hp=34ed785116b661e0c50b575cc609823e51c9b708;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=safe%2Fjmp%2Flinux-2.6 diff --git a/scripts/Lindent b/scripts/Lindent index 34ed785..9c4b3e2 100755 --- a/scripts/Lindent +++ b/scripts/Lindent @@ -1,2 +1,18 @@ #!/bin/sh -indent -kr -i8 -ts8 -sob -l80 -ss -ncs "$@" +PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1" +RES=`indent --version` +V1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1` +V2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2` +V3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3` +if [ $V1 -gt 2 ]; then + PARAM="$PARAM -il0" +elif [ $V1 -eq 2 ]; then + if [ $V2 -gt 2 ]; then + PARAM="$PARAM -il0"; + elif [ $V2 -eq 2 ]; then + if [ $V3 -ge 10 ]; then + PARAM="$PARAM -il0" + fi + fi +fi +indent $PARAM "$@"