Skip to content

Commit

Permalink
refactor: install.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed May 3, 2024
1 parent 066273c commit 05dc3f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion SHASUMS256.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ c80817f1dac65ee497fc8ca0b533e497aacfbf951a917ff4652825710bbacda7 v6.14.js
675896fe510fe86a6c4812c46334aafe789a05dd60652cca768b78971ca2b906 v6.16.js
be155eed896aa8c7900352c2b28640bcbace13171ec632b0e29f0ac94e5b27d1 v6.32.js
f8c728b2048a92948aff1979db70e21e89f410528d2d133112f1e2acc0214b34 install.sh
7881ea9b132eb7c6d12db6f14ca55bbb5d251edf08693d570eac31ad0d00c827 install.ps1
4adc03e95d53fcccd3d9dc6c464ce24aa8b4afd42dba04c5e9c603d964190db0 install.ps1
Binary file modified SHASUMS256.txt.sig
Binary file not shown.
17 changes: 7 additions & 10 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ if ($PSVersionTable.PSVersion.Major -eq 5) {

if ($PSVersionTable.PSVersion.Major -ge 6) {
if ($PSVersionTable.Platform -eq 'Unix') {
if ($PSVersionTable.OS -like 'Darwin*') {
$platform = 'macos'
}

if ($PSVersionTable.OS -like 'Linux*') {
$platform = 'linux'
}

if ($PSVersionTable.OS -like 'Ubuntu*') {
$platform = 'linux'
switch -Wildcard ($PSVersionTable.OS) {
'Darwin*' {
$platform = 'macos'
}
'Linux*', 'Ubuntu*' {
$platform = 'linux'
}
}

# PowerShell does not seem to have normal cmdlets for retrieving system information, so we use UNAME(1) for this.
Expand Down

0 comments on commit 05dc3f0

Please sign in to comment.