diff --git a/README.md b/README.md index d43d755..8fe71e4 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ After installation you're going to want to at least touch these points in your n - Passwords - ZFS: The password for all datasets underneath `zpool` is `password`. - Local `root` account: The local `root` account's password is `password`. -- Arch User Repository (AUR) helper: We installed [paru](https://github.com/Morganamilo/paru) as our AUR helper, we installed from GitHub via `makepkg -si`. +- Arch User Repository (AUR) helper: We installed [paru](https://github.com/Morganamilo/paru) as our AUR helper, we installed from GitHub via `makepkg -si` then replaced itself with its [paru-bin](https://aur.archlinux.org/packages/paru-bin) version from AUR. - In `/etc/systemd/network/50-wired.network` instead of a DHCP-based network config you can get a static one. The DHCP-based one for reference looks like: ``` ... diff --git a/setup.sh b/setup.sh index c4fffe4..74ae35c 100644 --- a/setup.sh +++ b/setup.sh @@ -460,7 +460,46 @@ function get_aur_helper () { } function paru_install () { - sudo --user build paru -S --noconfirm "${@}" + declare -a paru_install_packages + [[ "${1}" ]] && while :; do + case "${1}" in + -[[:alnum:]]*) + printf -- '%s\n' \ + 'Short-form argument '"'${1}'"' not supported for function '"'${FUNCNAME[0]}()'"'. Only known accepted argument' \ + 'is '"'"'--replace-conflicting'"'"' without a value given. Exiting ...' + exit 77 + ;; + --replace-conflicting) + pacman_force_yes='true' + shift + continue + ;; + --*) + printf -- '%s\n' \ + 'Long-form argument '"'${1}'"' not supported for function '"'${FUNCNAME[0]}()'"'. Only known accepted argument' \ + 'is '"'"'--replace-conflicting'"'"' without a value given. Exiting ...' + exit 77 + ;; + '') + # All arguments processed + break + ;; + *) + paru_install_packages+=("${1}") + shift + ;; + esac + done || { + printf -- '%s\n' \ + 'No argument '"'${1}'"' given for function '"'${FUNCNAME[0]}'"'. Exiting ...' + exit 77 + } + if [[ "${pacman_force_yes}" ]]; then + yes 'y' | sudo --user build paru -S "${paru_install_packages[@]}" + unset -v pacman_force_yes + else + sudo --user build paru -S --noconfirm "${paru_install_packages[@]}" + fi } function keep_initiramfs_root_only_rw () { @@ -525,6 +564,7 @@ function install_os_in_chroot () { unleash_makepkg add_motd_getting_started_msg get_aur_helper + paru_install --replace-conflicting 'paru-bin' paru_install 'zfs-dkms' 'zfs-utils' hwclock --systohc locale-gen