Add support for native windows
This commit is contained in:
parent
30eb32adc3
commit
dec2742902
10
compile.sh
10
compile.sh
|
@ -216,13 +216,21 @@ then
|
|||
errorPatterns+=("\(\)\(.*\)\(([[:digit:]]\+): \(warning\|note\|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[@]}"
|
||||
do
|
||||
sed -i \
|
||||
-e "/$errorPattern/{" \
|
||||
-e "h;" \
|
||||
-e "s/$errorPattern/\1\n\3/" \
|
||||
-e "x; s/$errorPattern/realpath \"\2\"/" \
|
||||
-e "x; s/$errorPattern/$fixCommand \"\2\"/" \
|
||||
-e "e" \
|
||||
-e "x; G; h;" \
|
||||
-e "s/\([^\n]*\)\n//" \
|
||||
|
|
Loading…
Reference in a new issue