1
0
Fork 0
mirror of synced 2024-12-22 16:18:59 -05:00

feat(setup-assistant): Add pamac to ultimate edition setup

This commit is contained in:
TotallyNotElite 2020-12-19 14:07:59 +01:00
parent 468b17b0c7
commit b331bc2ad9

View file

@ -70,9 +70,15 @@ function isOnline
function upgrade2ultimate
{
PACKAGES=()
# WARNING: Currently not executed in pamac mode!
PREPARE=()
SETUP=()
HAS_PAMAC_INSTALLER=false
if [ -x "$(command -v pamac-installer)" ]; then
HAS_PAMAC_INSTALLER=true
fi
if ! askYesNoQuestion "font-manager" "Upgrade to ULTIMATE" "update" "Do you need cjk font support (fixes missing characters)?"; then
PACKAGES+=("noto-fonts-cjk")
fi
@ -215,10 +221,17 @@ function upgrade2ultimate
SETUP+=("systemctl enable --now libvirtd")
fi
alacritty -e bash /usr/lib/setup-assistant/apply.sh <( IFS=$'\n'; echo "${PREPARE[*]}" ) <(printf '%s\n' "${PACKAGES[@]}") <( IFS=$'\n'; echo "${SETUP[*]}" )
if [ "$HAS_PAMAC_INSTALLER" = "true" ]; then
# Pamac can correctly handle the pamac-aur and pamac-all conflict, PREPARE can be ignored here.
if ! pamac-installer ${PACKAGES[@]} ; then
exit 0
fi
pkexec bash -c "$( IFS=$'\n'; echo "${SETUP[*]}" )"
else
alacritty -e bash /usr/lib/setup-assistant/apply.sh <( IFS=$'\n'; echo "${PREPARE[*]}" ) <(printf '%s\n' "${PACKAGES[@]}") <( IFS=$'\n'; echo "${SETUP[*]}" )
fi
}
# I'm kind of confused why this is not part of the installer?
systemctl --user enable psd >/dev/null 2>&1 &
systemctl --user start psd >/dev/null 2>&1 &
@ -237,7 +250,8 @@ if ! askYesNoQuestion "update" "Setup Assistant" "update" "Do you want to get a
fi
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Update the system? (recommended!)"; then
alacritty -e sudo pacman "-Syyu"
# yy because we may have updated the mirrorlist in the last step
alacritty -e pkexec pacman "-Syyu"
fi
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Upgrade to Ultimate? (You can select which apps you want!)"; then