From 13dc03091139555ecf673fa1682e7cb4e0d2cbc8 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sun, 22 May 2022 11:27:43 +0200 Subject: [PATCH] add -prepare-xorg option, allows custom environment installation afterwards --- usr/bin/archboot-update-installer.sh | 18 +++++++++++++++++- usr/lib/archboot/update-installer.sh | 10 ++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index 8291b502f..cfce84cbf 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -17,6 +17,7 @@ while [ $# -gt 0 ]; do -latest-image|--latest-image) _G_RELEASE="1" ;; -launch-xfce|--launch-xfce) _L_XFCE="1" ;; -launch-kde|--launch-kde) _L_KDE="1" ;; + -prepare-xorg | --prepare-xort) _PREPARE_XORG="1" ;; -h|--h|?) usage ;; *) usage ;; esac @@ -84,7 +85,22 @@ if [[ "${_G_RELEASE}" == "1" ]]; then echo -e "\033[1mFinished:\033[0m New isofiles are located in ${_W_DIR}" fi -# X launch +# prepare xorg +if [[ "${_PREPARE_XORG}" == "1" ]]; then + if ! [[ -d /usr.zram ]]; then + echo -e "\033[1mStep 1/3:\033[0m Move /usr to /usr.zram ..." + _zram_usr "${_ZRAM_SIZE}" + else + echo -e "\033[1mStep 1/3:\033[0m Move /usr to /usr.zram already done ..." + fi + echo -e "\033[1mStep 2/3:\033[0m Waiting for gpg pacman keyring import to finish ..." + _gpg_check + echo -e "\033[1mStep 3/3:\033[0m Preparing xorg ..." + echo " This will need some time ..." + _prepare_x +fi + +# KDE/PLASMA or XFCE launch if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" ]]; then if ! [[ -d /usr.zram ]]; then echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram ..." diff --git a/usr/lib/archboot/update-installer.sh b/usr/lib/archboot/update-installer.sh index a86340baa..b4ddf6744 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -25,14 +25,16 @@ usage () { echo -e " \033[1m-u\033[0m Update scripts: setup, quickinst, tz, km and helpers." echo -e "" fi + if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 &&\ + -e /usr/bin/setup && ! -e /var/cache/pacman/pkg/archboot.db ]]; then + echo -e " \033[1m-launch-kde\033[0m Launch KDE Plasma desktop with VNC sharing enabled." + echo "" + fi if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 &&\ -e /usr/bin/setup ]]; then echo -e " \033[1m-launch-xfce\033[0m Launch XFCE desktop with VNC sharing enabled." echo "" - fi - if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 &&\ - -e /usr/bin/setup && ! -e /var/cache/pacman/pkg/archboot.db ]]; then - echo -e " \033[1m-launch-kde\033[0m Launch KDE Plasma desktop with VNC sharing enabled." + echo -e " \033[1m-prepare-xorg\033[0m Prepare Xorg for installing custom X environment." echo "" fi if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3900000 &&\