projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d40e1e6
)
scripts/Lindent: handle missing indent gracefully
author
Jean Delvare
<
[email protected]
>
Fri, 4 Sep 2015 22:43:24 +0000
(15:43 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 4 Sep 2015 23:54:41 +0000
(16:54 -0700)
If indent is not found, bail out immediately instead of spitting random
shell script error messages.
Signed-off-by: Jean Delvare <
[email protected]
>
Cc: Joe Perches <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
scripts/Lindent
patch
|
blob
|
history
diff --git
a/scripts/Lindent
b/scripts/Lindent
index 9c4b3e2b7098a9d2af14c50614189c9a28cd689b..6d889de4e70b683a958dca75db40bee42f616fb9 100755
(executable)
--- 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`