PowerShell_Scripts/base.linux/Update-ArchOSz.ps1

14 lines
561 B
PowerShell
Raw Normal View History

param(
[ValidateSet('List','Update','Auto','All')]
[string]$Mode = 'List'
)
$script:yayCli = "cat /run/check.yay.updates/list"
switch( $Mode ){
'Update' { $yayCli = "yay -Syu --needed --ignore docker,linux,linux-api-headers,linux-firmware,linux-headers,zfs-linux" }
'Auto' { $yayCli = "yay -Syu --needed --noconfirm --ignore docker || yay -Syu --needed --ignore docker,linux,linux-api-headers,linux-firmware,linux-headers,zfs-linux --noconfirm" }
'All' { $yayCli = "yay -Syu --needed" }
}
& sh "-c" "$yayCli" -replace '#args',"$args"