Skip to content

Commit a1485d0

Browse files
committed
Added script for checking each project for errors
1 parent 6a53988 commit a1485d0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

checkerrors.sh

+29
Original file line numberDiff line numberDiff line change
@@ -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+
fi
28+
done && echo "Found $ERRCOUNT files with errors." )
29+
rm "$LOGFILE"

0 commit comments

Comments
 (0)