Add support for native windows
This commit is contained in:
parent
30eb32adc3
commit
dec2742902
1 changed files with 9 additions and 1 deletions
10
compile.sh
10
compile.sh
|
@ -216,13 +216,21 @@ then
|
||||||
errorPatterns+=("\(\)\(.*\)\(([[:digit:]]\+): \(warning\|note\|error\): \([A-Z0-9]\+: \)\?.*\)$")
|
errorPatterns+=("\(\)\(.*\)\(([[:digit:]]\+): \(warning\|note\|error\): \([A-Z0-9]\+: \)\?.*\)$")
|
||||||
errorPatterns+=("\(\"\)\(.*\)\(\", line [[:digit:]]\+\( (column [[:digit:]]\+)\)\?: \(Warning\|Error\): [A-Z0-9]\+: .*\)$");
|
errorPatterns+=("\(\"\)\(.*\)\(\", line [[:digit:]]\+\( (column [[:digit:]]\+)\)\?: \(Warning\|Error\): [A-Z0-9]\+: .*\)$");
|
||||||
|
|
||||||
|
if [ ! -z "${USE_WINDOWS_PATHS}" ]
|
||||||
|
then
|
||||||
|
echo "Help me! I am forced to use windows paths, omgg!";
|
||||||
|
fixCommand="wslpath -m";
|
||||||
|
else
|
||||||
|
fixCommand="realpath";
|
||||||
|
fi;
|
||||||
|
|
||||||
for errorPattern in "${errorPatterns[@]}"
|
for errorPattern in "${errorPatterns[@]}"
|
||||||
do
|
do
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "/$errorPattern/{" \
|
-e "/$errorPattern/{" \
|
||||||
-e "h;" \
|
-e "h;" \
|
||||||
-e "s/$errorPattern/\1\n\3/" \
|
-e "s/$errorPattern/\1\n\3/" \
|
||||||
-e "x; s/$errorPattern/realpath \"\2\"/" \
|
-e "x; s/$errorPattern/$fixCommand \"\2\"/" \
|
||||||
-e "e" \
|
-e "e" \
|
||||||
-e "x; G; h;" \
|
-e "x; G; h;" \
|
||||||
-e "s/\([^\n]*\)\n//" \
|
-e "s/\([^\n]*\)\n//" \
|
||||||
|
|
Loading…
Reference in a new issue