From 2e23ea01641b04acab08753f565949823b526fe6 Mon Sep 17 00:00:00 2001 From: Charlie Fish Date: Fri, 11 Jun 2021 17:54:05 -0600 Subject: [PATCH] =?utf8?q?Fixing=20issue=20in=20dnsmasq=20generation=20scr?= =?utf8?q?ipt=20where=20=E2=80=9C/=E2=80=9C=20would=20exist=20on=20header?= =?utf8?q?=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- scripts/generate-dnsmasq.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate-dnsmasq.js b/scripts/generate-dnsmasq.js index f76bf89..2c08431 100644 --- a/scripts/generate-dnsmasq.js +++ b/scripts/generate-dnsmasq.js @@ -6,9 +6,9 @@ const path = require("path"); await Promise.all(files.map(async (file) => { // For each file const fileContents = await fs.readFile(path.join(__dirname, "..", file), "utf8"); // Get file contents as a string const noIPFileContents = fileContents + .replaceAll(/0\.0\.0\.0 (.*?)( .*)?$/gmu, "0.0.0.0 $1/$2") // I need this line to add "/" at the end of each URL .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(/^(.*)$/gmu, "$1/") // 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 })); -- 2.47.3