add -prepare-xorg option, allows custom environment installation afterwards

This commit is contained in:
Tobias Powalowski 2022-05-22 11:27:43 +02:00
parent 5e65335459
commit 13dc030911
2 changed files with 23 additions and 5 deletions

View file

@ -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 ..."

View file

@ -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 &&\