mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-09-28 04:12:40 -06:00
kiss: use case statement for update outcomes
This commit is contained in:
parent
c02e58c395
commit
7d50b6ec9d
22
kiss
22
kiss
@ -1425,7 +1425,8 @@ pkg_updates() {
|
||||
|
||||
set -f
|
||||
|
||||
contains "$*" kiss && {
|
||||
case " $* " in
|
||||
*" kiss "*)
|
||||
log "Detected package manager update"
|
||||
log "The package manager will be updated first"
|
||||
|
||||
@ -1436,26 +1437,19 @@ pkg_updates() {
|
||||
|
||||
log "Updated the package manager"
|
||||
log "Re-run 'kiss update' to update your system"
|
||||
;;
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
[ "$1" ] || {
|
||||
" ")
|
||||
log "Everything is up to date"
|
||||
return
|
||||
}
|
||||
;;
|
||||
|
||||
*)
|
||||
log "Packages to update: $*"
|
||||
|
||||
# Build all packages requiring an update.
|
||||
# See [1] at top of script.
|
||||
# shellcheck disable=2046,2086
|
||||
{
|
||||
pkg_update=1
|
||||
pkg_build "$@"
|
||||
}
|
||||
|
||||
log "Updated all packages"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_clean() {
|
||||
|
Loading…
Reference in New Issue
Block a user