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.

25 lines
768 B

  1. 'use strict'
  2. // =====================================================
  3. // Wiki.js
  4. // Installation Script
  5. // =====================================================
  6. const path = require('path')
  7. const spawn = require('child_process').spawn
  8. const installDir = path.resolve(__dirname, '../..')
  9. const cmd = (process.platform !== 'win32')
  10. ? 'curl -s -S -o- https://wiki.js.org/install.sh | bash'
  11. : `PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://wiki.js.org/install.ps1'))"`
  12. console.info(`Executing installation script for ${process.platform} platform...`)
  13. let inst = spawn(cmd, [], {
  14. cwd: installDir,
  15. env: process.env,
  16. shell: true,
  17. stdio: 'inherit',
  18. detached: true
  19. })
  20. inst.unref()