diff options
-rw-r--r-- | src/SelfUpdater/index.js | 19 |
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 +}; |