From b476c9238b8fc8d2ff7cb5d0b829306138129e21 Mon Sep 17 00:00:00 2001 From: TheFlyingFool Date: Mon, 13 May 2024 16:31:39 -0500 Subject: [PATCH] Function ReWrite? --- setup.ps1 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/setup.ps1 b/setup.ps1 index a6611fc..0b18200 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -26,22 +26,22 @@ $settingsJson = @{installBehavior = @{ } $settingsJson | ConvertTo-Json | Out-File $settingsPath -Encoding utf8 -function InstallTheApps([array]$AppList) { - Foreach ($app in $AppList) { +function InstallTheApps() { + Foreach ($app in $apps) { $listApp = winget list --exact -q $app.name - if (![String]::Join('', $listApp).Contains($app.name)) { - Write-Host 'Installing:' $app.name - if ($null -ne $app.source) { - winget install --exact $app.name --source $app.source - # winget install --exact --silent $app.name --source $app.source - } - else { - winget install --exact $app.name - # winget install --exact --silent $app.name - } + if (![String]::Join("", $listApp).Contains($app.name)) { + Write-host "Installing:" $app.name + if ($null -ne $app.source) { + winget install --exact $app.name --source $app.source + # winget install --exact --silent $app.name --source $app.source } else { - Write-Host 'Skipping Install of ' $app.name + winget install --exact $app.name + # winget install --exact --silent $app.name + } + } + else { + Write-host "Skipping Install of " $app.name } } }