fix update runs

This commit is contained in:
Tobias Powalowski 2024-09-08 18:26:48 +02:00
parent a7b6060ead
commit 7b3aea510a
5 changed files with 22 additions and 30 deletions

View file

@ -23,7 +23,8 @@ _cleanup() {
} }
_run_pacman() { _run_pacman() {
for i in ${1}; do #shellcheck disable=2068
for i in $@; do
#shellcheck disable=SC2086 #shellcheck disable=SC2086
LC_ALL=C.UTF-8 pacman -Sy ${i} --noconfirm &>"${_LOG}" LC_ALL=C.UTF-8 pacman -Sy ${i} --noconfirm &>"${_LOG}"
if [[ ! -e "/.full_system" ]]; then if [[ ! -e "/.full_system" ]]; then
@ -51,7 +52,8 @@ _IGNORE=()
} }
_install_fix_packages() { _install_fix_packages() {
_run_pacman "$(echo ${_FIX_PACKAGES[@]})" #shellcheck disable=SC2068
_run_pacman ${_FIX_PACKAGES[@]}
rm /.archboot rm /.archboot
} }
@ -60,14 +62,16 @@ _install_graphic() {
if rg -q qxl /proc/modules; then if rg -q qxl /proc/modules; then
_GRAPHIC+=(xf86-video-qxl) _GRAPHIC+=(xf86-video-qxl)
fi fi
_run_pacman "$(echo ${_GRAPHIC[@]})" #shellcheck disable=SC2068
_run_pacman ${_GRAPHIC[@]}
rm /.archboot rm /.archboot
} }
_prepare_graphic() { _prepare_graphic() {
# fix libs first, then install packages from defaults # fix libs first, then install packages from defaults
_GRAPHIC="${1}" #shellcheck disable=SC2206
_GRAPHIC=($@)
if [[ ! -e "/.full_system" ]]; then if [[ ! -e "/.full_system" ]]; then
_progress "1" "Removing firmware files..." _progress "1" "Removing firmware files..."
rm -rf /usr/lib/firmware rm -rf /usr/lib/firmware
@ -129,14 +133,14 @@ _custom_wayland_xorg() {
if [[ -n "${_CUSTOM_WL}" ]]; then if [[ -n "${_CUSTOM_WL}" ]]; then
echo -e "\e[1mStep 1/2:\e[m Installing custom wayland..." echo -e "\e[1mStep 1/2:\e[m Installing custom wayland..."
echo " This will need some time..." echo " This will need some time..."
#shellcheck disable=SC2145 #shellcheck disable=SC2068,SC2086
_prepare_graphic "${_WAYLAND_PACKAGE} $(echo ${_CUSTOM_WAYLAND[@]})" > "${_LOG}" 2>&1 _prepare_graphic ${_WAYLAND_PACKAGE} ${_CUSTOM_WAYLAND[@]} > "${_LOG}" 2>&1
fi fi
if [[ -n "${_CUSTOM_X}" ]]; then if [[ -n "${_CUSTOM_X}" ]]; then
echo -e "\e[1mStep 1/2:\e[m Installing custom xorg..." echo -e "\e[1mStep 1/2:\e[m Installing custom xorg..."
echo " This will need some time..." echo " This will need some time..."
#shellcheck disable=SC2145 #shellcheck disable=SC2068,SC2086
_prepare_graphic "${_XORG_PACKAGE} $(echo ${_CUSTOM_XORG[@]})" > "${_LOG}" 2>&1 _prepare_graphic ${_XORG_PACKAGE} ${_CUSTOM_XORG[@]} > "${_LOG}" 2>&1
fi fi
echo -e "\e[1mStep 2/2:\e[m Setting up browser...\e[m" echo -e "\e[1mStep 2/2:\e[m Setting up browser...\e[m"
command -v firefox &>"${_NO_LOG}" && _firefox_flags command -v firefox &>"${_NO_LOG}" && _firefox_flags

View file

@ -26,20 +26,15 @@ EOF
done done
} }
_prepare_gnome() { _install_gnome() {
if ! [[ -e /usr/bin/gnome-session ]]; then if ! [[ -e /usr/bin/gnome-session ]]; then
_prepare_graphic "${_PACKAGES[@]}" #shellcheck disable=SC2086,SC2068
_prepare_graphic ${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_GNOME_PACKAGES[@]}
fi fi
_prepare_browser >"${_LOG}" 2>&1 _prepare_browser >"${_LOG}" 2>&1
_configure_gnome >"${_LOG}" 2>&1 _configure_gnome >"${_LOG}" 2>&1
} }
_install_gnome() {
#shellcheck disable=SC2206
_PACKAGES=(${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_GNOME_PACKAGES[@]})
_prepare_gnome
}
_start_gnome() { _start_gnome() {
_progress "100" "Launching GNOME Wayland now, logging is done on ${_LOG}..." _progress "100" "Launching GNOME Wayland now, logging is done on ${_LOG}..."
sleep 2 sleep 2

View file

@ -61,21 +61,15 @@ EOF
cp /etc/xdg/autostart/archboot.desktop /usr/share/applications/ cp /etc/xdg/autostart/archboot.desktop /usr/share/applications/
} }
_prepare_plasma() { _install_plasma() {
if ! [[ -e /usr/bin/startplasma-x11 ]]; then if ! [[ -e /usr/bin/startplasma-x11 ]]; then
_prepare_graphic "${_PACKAGES[@]}" #shellcheck disable=SC2086,SC2068
_prepare_graphic ${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_PLASMA_PACKAGES[@]}
fi fi
_prepare_browser >"${_LOG}" 2>&1 _prepare_browser >"${_LOG}" 2>&1
_configure_plasma >"${_LOG}" 2>&1 _configure_plasma >"${_LOG}" 2>&1
} }
_install_plasma() {
#shellcheck disable=SC2206
_PACKAGES=(${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_PLASMA_PACKAGES[@]})
_prepare_plasma
}
_start_plasma() { _start_plasma() {
_progress "100" "Launching Plasma/KDE Wayland now, logging is done on ${_LOG}..." _progress "100" "Launching Plasma/KDE Wayland now, logging is done on ${_LOG}..."
sleep 2 sleep 2

View file

@ -102,10 +102,9 @@ EOF
} }
_install_sway() { _install_sway() {
#shellcheck disable=SC2206
_PACKAGES=(${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_SWAY_PACKAGES[@]})
if ! [[ -e /usr/bin/sway ]]; then if ! [[ -e /usr/bin/sway ]]; then
_prepare_graphic "${_PACKAGES[@]}" #shellcheck disable=SC2086,SC2068
_prepare_graphic ${_WAYLAND_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_SWAY_PACKAGES[@]}
fi fi
_prepare_browser >"${_LOG}" 2>&1 _prepare_browser >"${_LOG}" 2>&1
_configure_sway >"${_LOG}" 2>&1 _configure_sway >"${_LOG}" 2>&1

View file

@ -3,8 +3,8 @@
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
_install_xfce() { _install_xfce() {
if ! [[ -e /usr/bin/startxfce4 ]]; then if ! [[ -e /usr/bin/startxfce4 ]]; then
#shellcheck disable=SC2145 #shellcheck disable=SC2086,SC2068
_prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} $(echo ${_STANDARD_PACKAGES[@]}) $(echo ${_XFCE_PACKAGES[@]})" _prepare_graphic ${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES[@]} ${_XFCE_PACKAGES[@]}
fi fi
_prepare_browser >"${_LOG}" 2>&1 _prepare_browser >"${_LOG}" 2>&1
_configure_xfce >"${_LOG}" 2>&1 _configure_xfce >"${_LOG}" 2>&1