
Docker and Docker-Compose commands and aliases: - dco: docker-compose - dcc: docker-compose config - dcedit/vidc/Edit-DockerCompose: edit docker-compose.yml and satellite files - dcdown.ps1 - dl/dll/dcl/dcll: view docker/docker-compose logs l : follow ll : just list - dx/dcx: docker / docker-compose exec - dcdown: docker-compose down - dcup: docker-compose up - dcr: docker-compose run - dcre: docker-compose restart - dcreup: docker-compose up with force recreate - di: docker inspect A bunch of other aliases and tools: - l/ll - shortcuts for ls -la - Edit-MyConfig with MyConfig.class: Edit various configuration files - Update-ArchOSz: my common update params for Arch all ready to run - Update-UbuntuOSz: my common update params for Ubuntu all ready to run - sz-df - a ps stylized df - sz-du - what's the size of a dir - sys.Linux/ls - a Linux specific ls (with all required configuration) Works in progress (not completely tested yet): - Stop-ProcessTree - Update-OSz.ps1 - src/smartsudo.inc.ps1
14 lines
394 B
PowerShell
14 lines
394 B
PowerShell
param(
|
|
[ValidateSet('List','Update','Auto','All')]
|
|
[string]$Mode = 'List'
|
|
)
|
|
|
|
$script:aptCli = "echo 'not defined'"
|
|
switch( $Mode ){
|
|
'List' { }
|
|
'Auto' { $aptCli = "sudo apt-get update && sudo apt-get upgrade --auto-remove --assume-yes" }
|
|
default { $aptCli = "sudo apt-get update && sudo apt-get upgrade --auto-remove " }
|
|
}
|
|
|
|
& sh "-c" "$aptCli" -replace '#args',"$args"
|
|
|