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.

15 lines
394 B

  1. param(
  2. [ValidateSet('List','Update','Auto','All')]
  3. [string]$Mode = 'List'
  4. )
  5. $script:aptCli = "echo 'not defined'"
  6. switch( $Mode ){
  7. 'List' { }
  8. 'Auto' { $aptCli = "sudo apt-get update && sudo apt-get upgrade --auto-remove --assume-yes" }
  9. default { $aptCli = "sudo apt-get update && sudo apt-get upgrade --auto-remove " }
  10. }
  11. & sh "-c" "$aptCli" -replace '#args',"$args"