Make profile dialogue platform independent
This commit is contained in:
parent
c90e7faf11
commit
8ec34cb39e
1 changed files with 14 additions and 10 deletions
|
@ -51,7 +51,7 @@ $null = New-Module {
|
||||||
$profiles = & {
|
$profiles = & {
|
||||||
. "$PSScriptRoot/SoftwareManagement.ps1";
|
. "$PSScriptRoot/SoftwareManagement.ps1";
|
||||||
|
|
||||||
if (Test-Command "wsl") {
|
if (-not $IsWindows -or (Test-Command "wsl")) {
|
||||||
return Invoke-ConfigScript "getProfiles";
|
return Invoke-ConfigScript "getProfiles";
|
||||||
} else {
|
} else {
|
||||||
return Get-ChildItem "$PSScriptRoot/../../../.config" | ForEach-Object { Split-Path -LeafBase $_ };
|
return Get-ChildItem "$PSScriptRoot/../../../.config" | ForEach-Object { Split-Path -LeafBase $_ };
|
||||||
|
@ -61,16 +61,20 @@ $null = New-Module {
|
||||||
$choice = $Host.UI.PromptForChoice(
|
$choice = $Host.UI.PromptForChoice(
|
||||||
"Select Profile",
|
"Select Profile",
|
||||||
(& {
|
(& {
|
||||||
switch (Get-Stage) {
|
if ($IsWindows) {
|
||||||
([WindowsInstallerAction]::Backup) {
|
switch (Get-Stage) {
|
||||||
"Which profile do you wish to back up?";
|
([WindowsInstallerAction]::Backup) {
|
||||||
}
|
"Which profile do you wish to back up?";
|
||||||
([WindowsInstallerAction]::Install) {
|
}
|
||||||
"Which profile do you wish to install?";
|
([WindowsInstallerAction]::Install) {
|
||||||
}
|
"Which profile do you wish to install?";
|
||||||
$null {
|
}
|
||||||
"Which profile do you wish to set up?";
|
$null {
|
||||||
|
"Which profile do you wish to set up?";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
"Please select a profile:";
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
(& {
|
(& {
|
||||||
|
|
Loading…
Reference in a new issue