Created
May 14, 2022 00:05
-
-
Save sidusnare/acfcf9afa1ecb61c2bc4802fdb6c639a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco feature enable -n allowGlobalConfirmation | |
choco feature enable -n allowEmptyChecksums | |
choco config set --name cacheLocation --value ${env:SYSTEMDRIVE}\sidusconfig\cache | |
$fail = @() | |
$sucsess = @() | |
$file = Get-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\first.json" -Raw | |
$packages = ConvertFrom-Json $file | |
$file = Get-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\second.json" -Raw | |
$packages += ConvertFrom-Json $file | |
$file = Get-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\dev.json" -Raw | |
$packages += ConvertFrom-Json $file | |
$file = Get-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\workstation.json" -Raw | |
$packages += ConvertFrom-Json $file | |
$file = Get-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\game.json" -Raw | |
$packages += ConvertFrom-Json $file | |
foreach ($p in $packages) { | |
echo "Installing: $p" | |
choco install --no-progress $p -y | |
$chocclso = $lastExitCode | |
if ( $choco -gt 0 ) { | |
$fail += $p | |
} else { | |
$sucsess += $p | |
} | |
} | |
$fail | ConvertTo-Json | Add-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\fail.json" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment