-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
32 lines (26 loc) · 846 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"use strict";
const fs = require("fs");
let config = require("./configs/config.json");
let RSS = require("./configs/RSS.json");
let argChannel = process.argv.splice(2)[0];
switch (argChannel) {
case "Stable":
config["channel"] = "Stable";
RSS["RSSFile"] = "Zeus-Runtime.rss"
console.log("Channel is Stable.");
break;
case "NuBeta":
config["channel"] = "NuBeta";
RSS["RSSFile"] = "Zeus-Runtime-NuBeta.rss"
console.log("Channel is NuBeta");
break;
case "LTS":
config["channel"] = "LTS";
RSS["RSSFile"] = "Zeus-Runtime-LTS.rss"
console.log("Channel is LTS");
break;
default:
break;
}
fs.writeFileSync("./configs/config.json", JSON.stringify(config, null, "\t"));
fs.writeFileSync("./configs/RSS.json", JSON.stringify(RSS));