We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a53988 commit a1485d0Copy full SHA for a1485d0
checkerrors.sh
@@ -0,0 +1,29 @@
1
+#!/bin/bash
2
+
3
+VERBOSE=false
4
+ERRFOUND=false
5
+ERRCOUNT=0
6
7
+LOGFILE=".checkerrors.log.tmp"
8
9
+case $1 in
10
+ -v|--verbose)
11
+ VERBOSE=true
12
+ ;;
13
+esac
14
15
+touch "$LOGFILE";
16
+ack -g "\.godot" | sed -r "s/(.+)\/([^\/]+)/\1/" | ( while read in;
17
+do
18
+ ERRFOUND=false
19
+ timeout 1 godot --path "$in" &> "$LOGFILE" || grep "ERROR" -i "$LOGFILE" &> /dev/null && printf "Error found in: $in\n" && ERRFOUND=true;
20
+ if [ "$ERRFOUND" = true ] ; then
21
+ if [ "$VERBOSE" = true ] ; then
22
+ printf "\n";
23
+ cat "$LOGFILE";
24
+ printf "\n**********************************************************\n\n";
25
+ fi
26
+ ERRCOUNT=$((ERRCOUNT+1));
27
28
+done && echo "Found $ERRCOUNT files with errors." )
29
+rm "$LOGFILE"
0 commit comments