Modularize profile selection
This commit is contained in:
parent
34fcf638d5
commit
603d7e41b0
@ -13,6 +13,7 @@ declare -r _name="$(basename -- "$0")"
|
||||
# Options
|
||||
declare -i _optchroot
|
||||
declare _optdest="/mnt"
|
||||
declare _optprofile="desktop"
|
||||
declare -i _opthelp
|
||||
declare -i _optverbose
|
||||
# Working variables
|
||||
@ -149,12 +150,13 @@ build-gentoo-chroot() {
|
||||
profile=$(
|
||||
eselect profile list \
|
||||
| grep -ie 'stable' \
|
||||
| grep -ie 'plasma/systemd' \
|
||||
| grep -ie "$profile" \
|
||||
| sort \
|
||||
| uniq \
|
||||
| head -n 1 \
|
||||
| grep -oP '\[\K[^\]]+'
|
||||
)
|
||||
) || error "Error finding profile: $profile" 51
|
||||
[ -z "$profile" ] && error "Could not find profile: $profile" 52
|
||||
log "Setting profile $profile"
|
||||
eselect profile set "$profile"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user