Fix: VS 2019 16.6 doesn't like newlines in <SettingsCommandLine>

This commit is contained in:
glx
2020-05-26 21:38:07 +02:00
committed by glx22
parent 800ade7702
commit 2b2f60caf5
8 changed files with 20 additions and 24 deletions

View File

@@ -263,19 +263,22 @@ generate() {
echo "Generating $2..."
# Everything above the !!FILTERS!! marker
cat "$ROOT_DIR/projects/$2".in | ${AWK} -v BINMODE=1 -v FILTERS="$3" -v FILES="$1" '
{ CR = (match($0, "\\r$") > 0 ? "\r" : "") }
/^$/ { next }
/!!FILTERS!!/ {
split(FILTERS, filters, "\n");
for (i = 1; filters[i] != ""; i++) {
print filters[i] CR;
line = $0
gsub(/!!FILTERS!!/, filters[i], line);
print line;
}
next;
}
/!!FILES!!/ {
split(FILES, files, "\n");
for (i = 1; files[i] != ""; i++) {
print files[i] CR;
line = $0
gsub(/!!FILES!!/, files[i], line);
print line;
}
next;
}