summaryrefslogtreecommitdiffstats
path: root/scripts/coccicheck
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccicheck')
-rwxr-xr-xscripts/coccicheck10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 4b65a0fd50a1..3f0bb3f0fddc 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -96,7 +96,15 @@ run_cmd_parmap() {
if [ $VERBOSE -ne 0 ] ; then
echo "Running ($NPROC in parallel): $@"
fi
- $@ 2>/dev/null
+ if [ "$DEBUG_FILE" != "/dev/null" -a "$DEBUG_FILE" != "" ]; then
+ if [ -f $DEBUG_FILE ]; then
+ echo "Debug file $DEBUG_FILE exists, bailing"
+ exit
+ fi
+ else
+ DEBUG_FILE="/dev/null"
+ fi
+ $@ 2>$DEBUG_FILE
if [[ $? -ne 0 ]]; then
echo "coccicheck failed"
exit $?