Skip to content

Commit fa70900

Browse files
jdelvaretorvalds
authored andcommitted
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 <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>
1 parent d40e1e6 commit fa70900

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎scripts/Lindent‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/sh
22
PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
33
RES=`indent --version`
4+
if [ "$RES" = "" ]; then
5+
exit 1
6+
fi
47
V1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1`
58
V2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2`
69
V3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3`

0 commit comments

Comments
 (0)