Prevent variable overwrite

This commit is contained in:
Manuel Thalmann 2024-08-10 15:16:57 +02:00
parent 9ad16b14fc
commit 99dd620cc8

View file

@ -193,7 +193,7 @@ $null = New-Module {
}
# Drivers
$null = New-Module {
& {
$driverPath = "$PSScriptRoot/../Drivers";
$mbPath = "$driverPath/ROG Zenith Extreme Alpha";
@ -201,14 +201,14 @@ $null = New-Module {
switch ($component) {
("ROG Zenith Extreme Alpha") {
. "$mbPath/MarvellEthernet/Manage.ps1" @arguments;
. "$mbPath/IntelWiFi/Manage.ps1" @arguments;
. "$mbPath/IntelBluetooth/Manage.ps1" @arguments;
. "$mbPath/AMDChipsetX399/Manage.ps1" @arguments;
. "$driverPath/AMDChipsetX399/Manage.ps1" @arguments;
& "$mbPath/MarvellEthernet/Manage.ps1" @arguments;
& "$mbPath/IntelWiFi/Manage.ps1" @arguments;
& "$mbPath/IntelBluetooth/Manage.ps1" @arguments;
& "$mbPath/AMDChipsetX399/Manage.ps1" @arguments;
& "$driverPath/AMDChipsetX399/Manage.ps1" @arguments;
}
("Predator Z301C") {
. "$driverPath/Predator Z301C/Manage.ps1" @arguments;
& "$driverPath/Predator Z301C/Manage.ps1" @arguments;
}
}
}
@ -239,29 +239,29 @@ $null = New-Module {
}
if (Get-Config "valhalla.hardware.eyeX") {
. "$driverPath/Tobii EyeX/Manage.ps1" @arguments;
& "$driverPath/Tobii EyeX/Manage.ps1" @arguments;
}
};
$null = New-Module {
& {
# Windows Config
$softwarePath = "$PSScriptRoot/../Software";
$commonSoftware = "$PSScriptRoot/../../Common/Software";
. "$softwarePath/Windows/Manage.ps1" @arguments;
& "$softwarePath/Windows/Manage.ps1" @arguments;
if (Get-Config "valhalla.hardware.logitechG") {
. "$softwarePath/LGHub/Manage.ps1" @arguments;
& "$softwarePath/LGHub/Manage.ps1" @arguments;
}
if (Test-Collection "essential") {
# Essentials
. "$softwarePath/OpenSSH/Manage.ps1" @arguments;
. "$softwarePath/PowerShell/Manage.ps1" @arguments;
. "$softwarePath/chocolatey/Manage.ps1" @arguments;
. "$softwarePath/zoxide/Manage.ps1" @arguments;
. "$commonSoftware/posh-git/Manage.ps1" @arguments;
. "$commonSoftware/Terminal-Icons/Manage.ps1" @arguments;
. "$commonSoftware/Oh My Posh/Manage.ps1" @arguments;
& "$softwarePath/OpenSSH/Manage.ps1" @arguments;
& "$softwarePath/PowerShell/Manage.ps1" @arguments;
& "$softwarePath/chocolatey/Manage.ps1" @arguments;
& "$softwarePath/zoxide/Manage.ps1" @arguments;
& "$commonSoftware/posh-git/Manage.ps1" @arguments;
& "$commonSoftware/Terminal-Icons/Manage.ps1" @arguments;
& "$commonSoftware/Oh My Posh/Manage.ps1" @arguments;
if ($install) {
Install-ChocoPackage `
@ -277,9 +277,9 @@ $null = New-Module {
if (Test-Collection "common") {
# Common Software
. "$softwarePath/WinSCP/Manage.ps1" @arguments;
. "$softwarePath/Thunderbird/Manage.ps1" @arguments;
. "$softwarePath/PuTTY/Manage.ps1" @arguments;
& "$softwarePath/WinSCP/Manage.ps1" @arguments;
& "$softwarePath/Thunderbird/Manage.ps1" @arguments;
& "$softwarePath/PuTTY/Manage.ps1" @arguments;
if ($install) {
Install-ChocoPackage `
@ -343,14 +343,14 @@ $null = New-Module {
}
# ToDo: Consider hiding behind own config?
. "$softwarePath/Ubiquiti UniFi Controller/Manage.ps1" @arguments;
& "$softwarePath/Ubiquiti UniFi Controller/Manage.ps1" @arguments;
# Internet Access
. "$softwarePath/Firefox/Manage.ps1" @arguments;
. "$softwarePath/MSEdgeRedirect/Manage.ps1" @arguments;
& "$softwarePath/Firefox/Manage.ps1" @arguments;
& "$softwarePath/MSEdgeRedirect/Manage.ps1" @arguments;
if (Test-Collection "fileSync") {
. "$softwarePath/Nextcloud/Manage.ps1" @arguments;
& "$softwarePath/Nextcloud/Manage.ps1" @arguments;
}
}
@ -405,10 +405,10 @@ $null = New-Module {
Remove-DesktopIcon "Docker*";
}
. "$softwarePath/VisualStudio/Manage.ps1" @arguments;
& "$softwarePath/VisualStudio/Manage.ps1" @arguments;
# Node.js
. "$softwarePath/NVS/Manage.ps1" @arguments;
& "$softwarePath/NVS/Manage.ps1" @arguments;
}
if (Test-Collection "gaming") {
@ -433,13 +433,13 @@ $null = New-Module {
Remove-DesktopIcon "EA.*";
}
. "$softwarePath/TrackMania Nations Forever/Manage.ps1" @arguments;
. "$softwarePath/TrackMania United Forever/Manage.ps1" @arguments;
. "$softwarePath/ManiaPlanet/Manage.ps1" @arguments;
. "$softwarePath/osu!/Manage.ps1" @arguments;
. "$softwarePath/osu!lazer/Manage.ps1" @arguments;
. "$softwarePath/RetroArch/Manage.ps1" @arguments;
. "$softwarePath/reWASD/Manage.ps1" @arguments;
& "$softwarePath/TrackMania Nations Forever/Manage.ps1" @arguments;
& "$softwarePath/TrackMania United Forever/Manage.ps1" @arguments;
& "$softwarePath/ManiaPlanet/Manage.ps1" @arguments;
& "$softwarePath/osu!/Manage.ps1" @arguments;
& "$softwarePath/osu!lazer/Manage.ps1" @arguments;
& "$softwarePath/RetroArch/Manage.ps1" @arguments;
& "$softwarePath/reWASD/Manage.ps1" @arguments;
}
};
}