update-gentoo

#423
Raw
Author
winny
Created
Jan. 23, 2022, 6:20 p.m.
Expires
Never
Size
600 bytes
Hits
75
Syntax
Bash
#!/usr/bin/env bash
set -eu -o pipefail

for phase in "$@"; do
    case "$phase" in
        sync)
            emerge --sync
            ;;
        upgrade)
            emerge -auDU --changed-deps @world
            dispatch-conf
            emerge -ac --exclude=sys-kernel/vanilla-kernel
            emerge -a --usepkg=n --getbinpkg=n --exclude=sys-kernel/vanilla-kernel @preserved-rebuild @module-rebuild
            ;;
        clean|rebooted)
            emerge -ac
            eclean-kernel -n 2
            eclean-dist -t 4m
            eclean-pkg -t 4m --changed-deps
    esac
done