Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. let { getEdgeBetaPath, getEdgeCanaryPath, getEdgeDevPath, getEdgePath } = require("..")
  2. let { execFile } = require("child_process")
  3. const { promisify } = require("util")
  4. // Todo when canary beta are released remove ignoredOnLinux
  5. // variable. And don't forget to update src/main.ts
  6. async function check(binaryPath, shouldBe) {
  7. shouldBe = shouldBe.toLowerCase()
  8. let ignoreOnLinux = ["canary", "beta", "edge"]
  9. if (process.platform === "linux" && ignoreOnLinux.includes(shouldBe)) {
  10. return
  11. }
  12. let pth = binaryPath()
  13. const { stdout } = await promisify(execFile)(pth, ["--version"])
  14. if (stdout.trim().toLowerCase().includes(shouldBe)) {
  15. console.log(`Passed: ${pth}`)
  16. } else {
  17. throw `Couldn't get ${pth} working`
  18. }
  19. }
  20. async function main() {
  21. await check(() => getEdgeBetaPath(), "Beta")
  22. await check(() => getEdgeCanaryPath(), "Canary")
  23. await check(() => getEdgeDevPath(), "Dev")
  24. await check(() => getEdgePath(), "Edge")
  25. }
  26. main().catch((e) => {
  27. console.log("Error from main", e)
  28. // Exit so ci can notice?
  29. process.exit(1)
  30. })