-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfepper.ps1
More file actions
42 lines (35 loc) · 756 Bytes
/
fepper.ps1
File metadata and controls
42 lines (35 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
cd $PSScriptRoot
$OSArchitecture = (Get-WmiObject Win32_OperatingSystem).OSArchitecture
if ($OSArchitecture -eq "32-bit")
{
$archMsi = "x86.msi"
}
else
{
$archMsi = "x64.msi"
}
$nodeVersion = "v18.14.2"
$nodeMsi = "node-" + $nodeVersion + "-" + $archMsi
$nodeMsiFull = $PSScriptRoot + "\" + $nodeMsi
$whereNode = where.exe node
if ($whereNode -Like "*\node.exe")
{
if (Test-Path $nodeMsi)
{
rm $nodeMsi
}
if (-Not (Test-Path node_modules))
{
echo "npm installing..."
npm install -g fepper-cli
npm install
}
node node_modules/fepper/index.js $args
}
else
{
iwr -OutFile $nodeMsi https://nodejs.org/dist/$nodeVersion/$nodeMsi
msiexec /i $nodeMsiFull
echo "Please follow the prompts to install Node.js."
}
PAUSE