Add support for armclang
errors
This commit is contained in:
parent
e63b364a2f
commit
2f9b0d2a8b
1 changed files with 19 additions and 8 deletions
27
compile.sh
27
compile.sh
|
@ -212,15 +212,26 @@ then
|
|||
xvfb-run bash -c "dwm & wine \"C:\Keil_v5\UV4\UV4.exe\" -j0 -b \"$projectFile\" -t \"$targetName\" -l \"$logFile\"" > /dev/null 2>&1;
|
||||
mv -f "$tempFile" "$projectFile";
|
||||
|
||||
errorPattern="\(.*\)\(([[:digit:]]\+): \(warning\|note\|error\): \([A-Z0-9]\+: \)\?.*\)$";
|
||||
errorPatterns=()
|
||||
errorPatterns+=("\(\)\(.*\)\(([[:digit:]]\+): \(warning\|note\|error\): \([A-Z0-9]\+: \)\?.*\)$")
|
||||
errorPatterns+=("\(\"\)\(.*\)\(\", line [[:digit:]]\+\( (column [[:digit:]]\+)\)\?: \(Warning\|Error\): [A-Z0-9]\+: .*\)$");
|
||||
|
||||
sed -i \
|
||||
-e "/$errorPattern/{" \
|
||||
-e "h; s/$errorPattern/realpath \"\1\"/;" \
|
||||
-e "x; s/$errorPattern/\2/; x;" \
|
||||
-e "e" \
|
||||
-e "G; s/\n//;" \
|
||||
-e "}" "$logFile";
|
||||
for errorPattern in "${errorPatterns[@]}"
|
||||
do
|
||||
echo "$errorPattern";
|
||||
sed -i \
|
||||
-e "/$errorPattern/{" \
|
||||
-e "h;" \
|
||||
-e "s/$errorPattern/\1\n\3/" \
|
||||
-e "x; s/$errorPattern/realpath \"\2\"/" \
|
||||
-e "e" \
|
||||
-e "x; G; h;" \
|
||||
-e "s/\([^\n]*\)\n//" \
|
||||
-e "s/\([^\n]*\)\n\(.*\)/\2\1/" \
|
||||
-e "x; s/\([^\n]*\)\n\(.*\)$/\1/" \
|
||||
-e "G; s/\n//" \
|
||||
-e "}" "$logFile";
|
||||
done;
|
||||
|
||||
cat "$logFile";
|
||||
|
||||
|
|
Loading…
Reference in a new issue