14 lines
561 B
PowerShell
14 lines
561 B
PowerShell
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"
|