aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stendahl <14180120+JakobST1n@users.noreply.github.com>2021-11-13 20:39:05 +0100
committerGitHub <noreply@github.com>2021-11-13 20:39:05 +0100
commitcde5789614fed5f6ad264aad63bd5b1336bc419c (patch)
tree4dcb809a763063364b8d45e76ec4683ca2629f3b
parent44740fea898b30d135316ee288a34d51980650ee (diff)
downloadLuxcena-Neo-cde5789614fed5f6ad264aad63bd5b1336bc419c.tar.gz
Luxcena-Neo-cde5789614fed5f6ad264aad63bd5b1336bc419c.zip
Update index.js
-rw-r--r--src/SelfUpdater/index.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/SelfUpdater/index.js b/src/SelfUpdater/index.js
index cc4e298..68f6a1d 100644
--- a/src/SelfUpdater/index.js
+++ b/src/SelfUpdater/index.js
@@ -209,10 +209,19 @@ class Updater {
async installDependencies() {
// So, the server is running as root, that means we can just do this.
// we shouldn't, but, anyway.
- await this.run("sh", ["-c", "wget -qO- https://deb.nodesource.com/setup_14.x | bash -"]);
- await this.run("apt", ["-qy", "install", "nodejs", "python3-pip"]);
- await this.run("pip3", ["install", "virtualenv"]);
- await this.run("sh", ["-c", `export NODE_ENV=development; npm --prefix \"${__appdir}\" install \"${__appdir}\"`]);
+ let arch = (await this.run(`uname`, ["-m"])).out.replace("\n","");
+ if (arch == "armv6l") {
+ await this.run("wget", ["https://unofficial-builds.nodejs.org/download/release/v14.10.0/node-v14.10.0-linux-armv6l.tar.gz"]);
+ await this.run("tar", ["-xzf" "node-v14.10.0-linux-armv6l.tar.gz"]);
+ await this.run("cp", ["-r", "node-v14.10.0-linux-armv6l/*", "/usr/local"]);
+ await this.run("rm", ["-r", "node-v14.10.0-linux-armv6l"]);
+ await this.run("rm", ["node-v14.10.0-linux-armv6l.tar.gz"]);
+ } else {
+ await this.run("sh", ["-c", "wget -qO- https://deb.nodesource.com/setup_14.x | bash -"]);
+ await this.run("apt", ["-qy", "install", "nodejs", "python3-pip"]);
+ await this.run("pip3", ["install", "virtualenv"]);
+ await this.run("sh", ["-c", `export NODE_ENV=development; npm --prefix \"${__appdir}\" install \"${__appdir}\"`]);
+ }
}
async makeVirtualenv() {
@@ -305,4 +314,4 @@ class SelfUpdater {
module.exports = (_neoModules) => {
neoModules = _neoModules;
return new SelfUpdater();
-}; \ No newline at end of file
+};