From: Jean Delvare Date: Fri, 4 Sep 2015 22:43:24 +0000 (-0700) Subject: scripts/Lindent: handle missing indent gracefully X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~11675^2~101 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=fa70900e0984792cc45a9e51c28684c3287058c2;p=mirror_ubuntu-focal-kernel.git scripts/Lindent: handle missing indent gracefully If indent is not found, bail out immediately instead of spitting random shell script error messages. Signed-off-by: Jean Delvare Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/Lindent b/scripts/Lindent index 9c4b3e2b7098..6d889de4e70b 100755 --- a/scripts/Lindent +++ b/scripts/Lindent @@ -1,6 +1,9 @@ #!/bin/sh PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1" RES=`indent --version` +if [ "$RES" = "" ]; then + exit 1 +fi 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`