-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9b8c5f
commit 088242e
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env node | ||
"use strict"; | ||
var os = require("os"); | ||
var fs = require("fs"); | ||
var platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; | ||
var knownPlatforms = { | ||
"linux x64 LE": { | ||
"pkgName": "@icloudpd/linux-x64", | ||
"subPath": "bin/icloudpd" | ||
}, | ||
"linux ia32 LE": { | ||
"pkgName": "@icloudpd/linux-ia32", | ||
"subPath": "bin/icloudpd" | ||
}, | ||
"linux arm64 LE": { | ||
"pkgName": "@icloudpd/linux-arm64", | ||
"subPath": "bin/icloudpd" | ||
}, | ||
"linux arm LE": { | ||
"pkgName": "@icloudpd/linux-arm", | ||
"subPath": "bin/icloudpd" | ||
}, | ||
"darwin x64 LE": { | ||
"pkgName": "@icloudpd/darwin-x64", | ||
"subPath": "bin/icloudpd" | ||
}, | ||
"darwin arm64 LE": { | ||
"pkgName": "@icloudpd/darwin-arm64", | ||
"subPath": "bin/icloudpd" | ||
}, | ||
"win32 x64 LE": { | ||
"pkgName": "@icloudpd/win32-x64", | ||
"subPath": "bin/icloudpd.exe" | ||
} | ||
}; | ||
if (platformKey in knownPlatforms) { | ||
// all good to proceed | ||
} else { | ||
throw new Error(`Unsupported platform: '${platformKey}'`); | ||
} |