public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Lindent: Handle missing indent gracefully
@ 2015-07-10 11:47 Jean Delvare
  2015-07-10 11:51 ` Joe Perches
  0 siblings, 1 reply; 7+ messages in thread
From: Jean Delvare @ 2015-07-10 11:47 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton

If indent is not found, bail out immediately instead of spitting
random shell script error messages.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
 scripts/Lindent |    3 +++
 1 file changed, 3 insertions(+)

--- linux-4.2-rc0.orig/scripts/Lindent	2015-06-22 07:05:43.000000000 +0200
+++ linux-4.2-rc0/scripts/Lindent	2015-07-10 13:45:56.864031472 +0200
@@ -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`

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-15 21:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10 11:47 [PATCH] Lindent: Handle missing indent gracefully Jean Delvare
2015-07-10 11:51 ` Joe Perches
2015-07-10 13:36   ` Jean Delvare
2015-07-10 17:04     ` Joe Perches
2015-07-10 21:37       ` Andrew Morton
2015-07-11 12:56         ` Joe Perches
2015-07-15 21:15           ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox