Script directory for a PowerShell profile. https://blog.lksz.me/keeping-track-of-everything/#-mypsscriptroot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
561 B

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