Run upgrade/clean only if some packages to upgrade
This commit is contained in:
parent
f6b1010c55
commit
3e627904b9
|
@ -16,7 +16,8 @@
|
|||
if-shell -b 'tmux has-session' {
|
||||
|
||||
# Window for system update
|
||||
# Run upgrade only if packages to upgrade
|
||||
display-message "Create a new window for system update"
|
||||
new-window -nAPT 'sudo apt update ; sudo aptitude full-upgrade ; sudo aptitude clean ; exec ${SHELL}'
|
||||
new-window -nAPT 'sudo apt update ; test $(apt list --upgradable 2>/dev/null | wc --lines) -gt 1 && { sudo aptitude full-upgrade ; sudo aptitude clean } ; logout'
|
||||
}
|
||||
# }}}
|
||||
|
|
Loading…
Reference in New Issue