diff --git a/.installer/packages b/.installer/packages index 00824a1..445e207 100644 --- a/.installer/packages +++ b/.installer/packages @@ -1,3 +1,3 @@ -pacman-any:code,feh,i3exit,i3status,network-manager-applet,pasystray,vim,xautolock,xss-lock,yay +pacman-any:code,feh,i3exit,i3status,network-manager-applet,pasystray,vim,xautolock,xss-lock,noto-fonts-emoji pacman-laptop:brightnessctl aur-any:picom-git,flashfocus-git,sddm-theme-aerial-git diff --git a/setup_system.sh b/setup_system.sh index d280b4b..4103379 100755 --- a/setup_system.sh +++ b/setup_system.sh @@ -44,9 +44,6 @@ while getopts ":uh" arg; do esac done -YAY_ARGS="--aur --answerdiff NotInstalled --answeredit None --answerclean All --answerupgrade None" -ID_LIKE="$(grep ID_LIKE= /dev/null } +function prepare_arch() { + which pamac >/dev/null && return 0 + sudo pacman -S pamac --noconfirm || return 1 +} + function setup_arch_with_pamac() { local targets=("pacman-any") packages is_laptop && targets+=("pacman-laptop") packages="$(get_packages "${targets[@]}")" # shellcheck disable=SC2086 - sudo pamac install --no-confirm $packages || return 1 + sudo pamac install $packages --no-confirm || return 1 } function setup_arch_with_yay() { local targets=("aur-any") packages is_laptop && targets+=("aur-laptop") - while read -r package; do + for package in $(get_packages "${targets[@]}"); do if pacman -Qs "^$package$" >/dev/null; then if $UPGRADE_PACKAGES; then echo "Package '$package' will be upgraded." @@ -107,18 +109,20 @@ function setup_arch_with_yay() { echo "Package '$package' will be installed." fi - # shellcheck disable=SC2086 - yay -S "$package" $YAY_ARGS || return 1 - done <<<"$(get_packages "${targets[@]}")" + sudo pamac build "$package" --no-confirm || return 1 + done } function setup_arch() { - setup_arch_with_pamac || return 1 - setup_arch_with_yay || return 2 - configure_sddm || return 3 + prepare_arch || return 1 + setup_arch_with_pamac || return 2 + setup_arch_with_yay || return 3 + configure_sddm || return 4 } -echo "Setting up ${ID_LIKE^}-like OS." +ID_LIKE="$(grep ID_LIKE=