From: gap579137 Date: Fri, 11 Jun 2021 13:21:49 +0000 (-0500) Subject: Update generate-dnsmasq.js X-Git-Tag: aggregated-20250518~570 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5215b5f3dcc24a2e5128396435ec1226f37ee8d;p=thirdparty%2Fblocklistproject%2Flists.git Update generate-dnsmasq.js --- diff --git a/scripts/generate-dnsmasq.js b/scripts/generate-dnsmasq.js index e5ea876..a34d1b5 100644 --- a/scripts/generate-dnsmasq.js +++ b/scripts/generate-dnsmasq.js @@ -8,7 +8,7 @@ const path = require("path"); const noIPFileContents = fileContents .replaceAll(/^0\.0\.0\.0 /gmu, "server=/") // Replace all occurances of "0.0.0.0 " at the beginning of the line with "server=/" .replaceAll(/^# 0\.0\.0\.0 /gmu, "# server=/") // Replace all occurances of "# 0.0.0.0 " at the beginning of the line with "# server=/" - // .replaceAll(/^# 0\.0\.0\.0 /gmu, "# server=/") // I need this line to add "/" at the end of each URL + .replaceAll(/^(.*)$/gmu, "$0/") // I need this line to add "/" at the end of each URL .replace(/^# Title: (.*?)$/gmu, "# Title: $1 (NL)"); // Add (NL) to end of title await fs.writeFile(path.join(__dirname, "..", "dnsmasq-version", file.replace(".txt", "-dnsmasq.txt")), noIPFileContents, "utf8"); // Write new file to `alt-version` directory }));