install.js 768 Bytes
Newer Older
NGPixel's avatar
NGPixel committed
1 2
'use strict'

3 4 5 6 7
// =====================================================
// Wiki.js
// Installation Script
// =====================================================

NGPixel's avatar
NGPixel committed
8
const path = require('path')
9
const spawn = require('child_process').spawn
10
const installDir = path.resolve(__dirname, '../..')
11 12 13 14 15 16 17 18 19 20 21 22
const cmd = (process.platform !== 'win32')
  ? 'curl -s -S -o- https://wiki.js.org/install.sh | bash'
  : `PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://wiki.js.org/install.ps1'))"`

console.info(`Executing installation script for ${process.platform} platform...`)

let inst = spawn(cmd, [], {
  cwd: installDir,
  env: process.env,
  shell: true,
  stdio: 'inherit',
  detached: true
NGPixel's avatar
NGPixel committed
23
})
24 25

inst.unref()