diff options
author | Minteck <contact@minteck.org> | 2022-03-27 17:56:40 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-03-27 17:56:40 +0200 |
commit | 44b4222bc02f102480d1afe05d940612ff6cb983 (patch) | |
tree | 936e6baf8039e065324cd1c2e453c33ec4cf4122 /commands/installable.js | |
parent | 1d8cbd4b6a7b654c77d8cd3793bc67811a39725d (diff) | |
download | twilight-44b4222bc02f102480d1afe05d940612ff6cb983.tar.gz twilight-44b4222bc02f102480d1afe05d940612ff6cb983.tar.bz2 twilight-44b4222bc02f102480d1afe05d940612ff6cb983.zip |
WIP Alicorn port (abandonned, To be removed)
Diffstat (limited to 'commands/installable.js')
-rw-r--r-- | commands/installable.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/commands/installable.js b/commands/installable.js index 2c80d58..db7e30f 100644 --- a/commands/installable.js +++ b/commands/installable.js @@ -64,9 +64,9 @@ module.exports = async () => { signs[pack.id] = c.red("unsafe");
}
- if (pack.platforms.windows === 2 && pack.platforms.linux === 2 && pack.platforms.mac === 2) {
+ if (pack.platforms.windows === 2 && pack.platforms.linux === 2 && pack.platforms.mac === 2 && pack.platforms.alicorn === 2) {
platforms[pack.id] = c.cyan("all");
- } else if (pack.platforms.windows === 1 && pack.platforms.linux === 1 && pack.platforms.mac === 1) {
+ } else if (pack.platforms.windows === 1 && pack.platforms.linux === 1 && pack.platforms.mac === 1 && pack.platforms.alicorn === 1) {
platforms[pack.id] = c.yellow("all");
} else {
platforms[pack.id] = "";
@@ -76,6 +76,8 @@ module.exports = async () => { if (pack.platforms.linux === 2) { platforms[pack.id] += c.cyan("linux") + "," }
if (pack.platforms.mac === 1) { platforms[pack.id] += c.yellow("macos") + "," }
if (pack.platforms.mac === 2) { platforms[pack.id] += c.cyan("macos") + "," }
+ if (pack.platforms.alicorn === 1) { platforms[pack.id] += c.yellow("alicorn") + "," }
+ if (pack.platforms.alicorn === 2) { platforms[pack.id] += c.cyan("alicorn") + "," }
if (platforms[pack.id].endsWith(",")) { platforms[pack.id] = platforms[pack.id].substring(0, platforms[pack.id].length - 1) }
}
@@ -86,11 +88,13 @@ module.exports = async () => { let pack = JSON.parse(fs.readFileSync(home + "/repository/" + dir + "/" + pkg + ".json").toString());
installable = true;
- if (os.platform() === "win32" && pack.platforms.windows === 0) {
+ if (twiplatform === "win32" && pack.platforms.windows === 0) {
installable = false;
- } else if (os.platform() === "linux" && pack.platforms.linux === 0) {
+ } else if (twiplatform === "linux" && pack.platforms.linux === 0) {
installable = false;
- } else if (os.platform() === "darwin" && pack.platforms.mac === 0) {
+ } else if (twiplatform === "darwin" && pack.platforms.mac === 0) {
+ installable = false;
+ } else if (twiplatform === "alicorn" && pack.platforms.alicorn === 0) {
installable = false;
}
|