build: update SVR.JS installation script to work with zip archives without svr.compressed
This commit is contained in:
parent
a5facb0bd1
commit
36e4eae423
1 changed files with 11 additions and 9 deletions
|
@ -57,6 +57,7 @@ function downloadSVRJS(version) {
|
|||
);
|
||||
});
|
||||
if (!fs.existsSync(__dirname + "/svrjs/mods")) fs.mkdirSync(__dirname + "/svrjs/mods");
|
||||
if (fs.existsSync(__dirname + "/svrjs/svr.compressed")) {
|
||||
console.log("Deleting SVR.JS stub...");
|
||||
fs.unlinkSync(__dirname + "/svrjs/svr.js");
|
||||
// Modules aren't extracted in SVR.JS's 4.x stub, so no module extraction code here.
|
||||
|
@ -66,6 +67,7 @@ function downloadSVRJS(version) {
|
|||
);
|
||||
fs.unlinkSync(__dirname + "/svrjs/svr.compressed");
|
||||
fs.writeFileSync(__dirname + "/svrjs/svr.js", script);
|
||||
}
|
||||
console.log("SVR.JS is installed successfully.");
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue