diff options
author | Minteck <contact@minteck.org> | 2022-02-12 17:20:52 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-02-12 17:20:52 +0100 |
commit | c9b8915a23a883b5b76868c227fcc58ae6ed694d (patch) | |
tree | aefbe35265e85b674488f1f84a721dac049fe68c /commands/install.js | |
parent | 3eec02fd314dae41ac82d7b01f05e95cc80e1282 (diff) | |
download | twilight-c9b8915a23a883b5b76868c227fcc58ae6ed694d.tar.gz twilight-c9b8915a23a883b5b76868c227fcc58ae6ed694d.tar.bz2 twilight-c9b8915a23a883b5b76868c227fcc58ae6ed694d.zip |
Update
Diffstat (limited to 'commands/install.js')
-rw-r--r-- | commands/install.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/commands/install.js b/commands/install.js index b65725d..6f0df0c 100644 --- a/commands/install.js +++ b/commands/install.js @@ -145,6 +145,14 @@ module.exports = async (argv) => { spinner.succeed("Extracting package... done"); console.log(" Size change: +" + require('../hooks/size')(pkg.id)); + if (os.platform() === "win32" && typeof pkg.executable.windows === "string") { + fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + pkg.id + ".bat", pkg.executable.windows); + } else if (os.platform() === "linux" && typeof pkg.executable.linux === "string") { + fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + pkg.id + ".sh", pkg.executable.linux); + } else if (os.platform() === "darwin" && typeof pkg.executable.mac === "string") { + fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + pkg.id + ".sh", pkg.executable.mac); + } + let postinstall = []; if (os.platform() === "win32") postinstall = pkg.postinstall.windows; if (os.platform() === "linux") postinstall = pkg.postinstall.linux; |