Skip to content

Commit

Permalink
scripts/Lindent: handle missing indent gracefully
Browse files Browse the repository at this point in the history
If indent is not found, bail out immediately instead of spitting random
shell script error messages.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
jdelvare authored and torvalds committed Sep 4, 2015
1 parent d40e1e6 commit fa70900
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/Lindent
Original file line number Diff line number Diff line change
@@ -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`
Expand Down

0 comments on commit fa70900

Please sign in to comment.