diff --git a/usr/lib/archboot/update/desktop.sh b/usr/lib/archboot/update/desktop.sh index 8bf05c8b7..ba8d54f34 100644 --- a/usr/lib/archboot/update/desktop.sh +++ b/usr/lib/archboot/update/desktop.sh @@ -23,7 +23,8 @@ _cleanup() { } _run_pacman() { - for i in ${1}; do + #shellcheck disable=2068 + for i in $@; do #shellcheck disable=SC2086 LC_ALL=C.UTF-8 pacman -Sy ${i} --noconfirm &>"${_LOG}" if [[ ! -e "/.full_system" ]]; then @@ -51,7 +52,8 @@ _IGNORE=() } _install_fix_packages() { - _run_pacman "$(echo ${_FIX_PACKAGES[@]})" + #shellcheck disable=SC2068 + _run_pacman ${_FIX_PACKAGES[@]} rm /.archboot } @@ -60,14 +62,16 @@ _install_graphic() { if rg -q qxl /proc/modules; then _GRAPHIC+=(xf86-video-qxl) fi - _run_pacman "$(echo ${_GRAPHIC[@]})" + #shellcheck disable=SC2068 + _run_pacman ${_GRAPHIC[@]} rm /.archboot } _prepare_graphic() { # fix libs first, then install packages from defaults - _GRAPHIC="${1}" + #shellcheck disable=SC2206 + _GRAPHIC=($@) if [[ ! -e "/.full_system" ]]; then _progress "1" "Removing firmware files..." rm -rf /usr/lib/firmware @@ -129,14 +133,14 @@ _custom_wayland_xorg() { if [[ -n "${_CUSTOM_WL}" ]]; then echo -e "\e[1mStep 1/2:\e[m Installing custom wayland..." echo " This will need some time..." - #shellcheck disable=SC2145 - _prepare_graphic "${_WAYLAND_PACKAGE} $(echo ${_CUSTOM_WAYLAND[@]})" > "${_LOG}" 2>&1 + #shellcheck disable=SC2068,SC2086 + _prepare_graphic ${_WAYLAND_PACKAGE} ${_CUSTOM_WAYLAND[@]} > "${_LOG}" 2>&1 fi if [[ -n "${_CUSTOM_X}" ]]; then echo -e "\e[1mStep 1/2:\e[m Installing custom xorg..." echo " This will need some time..." - #shellcheck disable=SC2145 - _prepare_graphic "${_XORG_PACKAGE} $(echo ${_CUSTOM_XORG[@]})" > "${_LOG}" 2>&1 + #shellcheck disable=SC2068,SC2086 + _prepare_graphic ${_XORG_PACKAGE} ${_CUSTOM_XORG[@]} > "${_LOG}" 2>&1 fi echo -e "\e[1mStep 2/2:\e[m Setting up browser...\e[m" command -v firefox &>"${_NO_LOG}" && _firefox_flags diff --git a/usr/lib/archboot/update/gnome.sh b/usr/lib/archboot/update/gnome.sh index 4301cd8d4..7eabcd520 100644 --- a/usr/lib/archboot/update/gnome.sh +++ b/usr/lib/archboot/update/gnome.sh @@ -26,20 +26,15 @@ EOF done } -_prepare_gnome() { +_install_gnome() { if ! [[ -e /usr/bin/gnome-session ]]; then - _prepare_graphic "${_PACKAGES[@]}" + #shellcheck disable=SC2086,SC2068 + _prepare_graphic ${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_GNOME_PACKAGES[@]} fi _prepare_browser >"${_LOG}" 2>&1 _configure_gnome >"${_LOG}" 2>&1 } -_install_gnome() { - #shellcheck disable=SC2206 - _PACKAGES=(${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_GNOME_PACKAGES[@]}) - _prepare_gnome -} - _start_gnome() { _progress "100" "Launching GNOME Wayland now, logging is done on ${_LOG}..." sleep 2 diff --git a/usr/lib/archboot/update/plasma.sh b/usr/lib/archboot/update/plasma.sh index 92b70ff90..3f5bbce90 100644 --- a/usr/lib/archboot/update/plasma.sh +++ b/usr/lib/archboot/update/plasma.sh @@ -61,21 +61,15 @@ EOF cp /etc/xdg/autostart/archboot.desktop /usr/share/applications/ } -_prepare_plasma() { +_install_plasma() { if ! [[ -e /usr/bin/startplasma-x11 ]]; then - _prepare_graphic "${_PACKAGES[@]}" + #shellcheck disable=SC2086,SC2068 + _prepare_graphic ${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_PLASMA_PACKAGES[@]} fi _prepare_browser >"${_LOG}" 2>&1 _configure_plasma >"${_LOG}" 2>&1 } -_install_plasma() { - #shellcheck disable=SC2206 - _PACKAGES=(${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_PLASMA_PACKAGES[@]}) - _prepare_plasma -} - - _start_plasma() { _progress "100" "Launching Plasma/KDE Wayland now, logging is done on ${_LOG}..." sleep 2 diff --git a/usr/lib/archboot/update/sway.sh b/usr/lib/archboot/update/sway.sh index 31e9d63bd..b638837fb 100644 --- a/usr/lib/archboot/update/sway.sh +++ b/usr/lib/archboot/update/sway.sh @@ -102,10 +102,9 @@ EOF } _install_sway() { - #shellcheck disable=SC2206 - _PACKAGES=(${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_SWAY_PACKAGES[@]}) if ! [[ -e /usr/bin/sway ]]; then - _prepare_graphic "${_PACKAGES[@]}" + #shellcheck disable=SC2086,SC2068 + _prepare_graphic ${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_SWAY_PACKAGES[@]} fi _prepare_browser >"${_LOG}" 2>&1 _configure_sway >"${_LOG}" 2>&1 diff --git a/usr/lib/archboot/update/xfce.sh b/usr/lib/archboot/update/xfce.sh index 7e5f7e8cc..8137d3da9 100644 --- a/usr/lib/archboot/update/xfce.sh +++ b/usr/lib/archboot/update/xfce.sh @@ -3,8 +3,8 @@ # created by Tobias Powalowski _install_xfce() { if ! [[ -e /usr/bin/startxfce4 ]]; then - #shellcheck disable=SC2145 - _prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} $(echo ${_STANDARD_PACKAGES[@]}) $(echo ${_XFCE_PACKAGES[@]})" + #shellcheck disable=SC2086,SC2068 + _prepare_graphic ${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_XFCE_PACKAGES[@]} fi _prepare_browser >"${_LOG}" 2>&1 _configure_xfce >"${_LOG}" 2>&1