archboot/usr/bin/archboot-update-installer.sh

69 lines
2.1 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
# created by Tobias Powalowski <tpowa@archlinux.org>
. /etc/archboot/defaults
2022-03-21 22:25:15 +01:00
. /usr/lib/archboot/common.sh
2022-05-03 15:36:34 +02:00
. /usr/lib/archboot/container.sh
2022-09-23 08:52:39 +02:00
#shellcheck disable=SC1094
2022-04-25 15:11:54 +02:00
. /usr/lib/archboot/update-installer.sh
2022-05-20 10:32:26 +02:00
. /usr/lib/archboot/xfce.sh
2022-05-23 10:04:50 +02:00
. /usr/lib/archboot/gnome.sh
2022-05-28 11:19:22 +02:00
. /usr/lib/archboot/gnome-wayland.sh
. /usr/lib/archboot/plasma.sh
. /usr/lib/archboot/plasma-wayland.sh
2021-09-22 09:02:56 +02:00
[[ -z "${1}" ]] && usage
while [ $# -gt 0 ]; do
2022-04-30 08:47:58 +02:00
case ${1} in
-u|--u) _D_SCRIPTS="1" ;;
-latest|--latest) _L_COMPLETE="1" ;;
-latest-install|--latest-install) _L_INSTALL_COMPLETE="1";;
-latest-image|--latest-image) _G_RELEASE="1" ;;
-xfce|--xfce) _L_XFCE="1" ;;
-gnome|--gnome) _L_GNOME="1";;
-gnome-wayland|--gnome-wayland) _L_GNOME_WAYLAND="1";;
-plasma|--plasma) _L_PLASMA="1" ;;
-plasma-wayland|--plasma-wayland) _L_PLASMA_WAYLAND="1" ;;
2022-05-22 14:13:58 +02:00
-custom-xorg|--custom-xorg) _CUSTOM_X="1" ;;
-custom-wayland|--custom-wayland) _CUSTOM_WAYLAND="1" ;;
2022-10-08 18:47:45 +02:00
-full-system) _FULL_SYSTEM="1" ;;
2022-04-30 08:47:58 +02:00
-h|--h|?) usage ;;
*) usage ;;
esac
shift
2021-09-22 09:02:56 +02:00
done
2022-04-25 15:11:54 +02:00
_archboot_check
_download_latest
2022-03-27 13:16:20 +02:00
echo -e "\033[1mInformation:\033[0m Logging is done on \033[1m/dev/tty7\033[0m ..."
2022-06-01 19:42:15 +02:00
_zram_initialize
2021-09-22 09:02:56 +02:00
# Generate new environment and launch it with kexec
2022-01-13 17:21:39 +01:00
if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then
_new_environment
2021-09-22 09:02:56 +02:00
fi
2021-09-22 09:02:56 +02:00
# Generate new images
2022-01-13 17:21:39 +01:00
if [[ "${_G_RELEASE}" == "1" ]]; then
_new_image
2021-09-22 09:02:56 +02:00
fi
# install custom xorg or wayland
if [[ "${_CUSTOM_X}" == "1" || "${_CUSTOM_WAYLAND}" == "1" ]]; then
_custom_wayland_xorg
fi
# Gnome, KDE/PLASMA or XFCE launch
if [[ "${_L_XFCE}" == "1" || "${_L_PLASMA}" == "1" || "${_L_GNOME}" == "1" || "${_L_GNOME_WAYLAND}" == "1" || "${_L_PLASMA_WAYLAND}" == "1" ]]; then
if [[ -e "/.graphic_installed" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]]; then
2022-10-09 19:52:06 +02:00
_hint_graphic_installed
else
_install_graphic
fi
fi
2022-10-08 18:44:57 +02:00
# Switch to full Arch Linux system
2022-10-08 19:45:00 +02:00
if [[ "${_FULL_SYSTEM}" == "1" ]]; then
_full_system
2022-10-06 22:55:35 +02:00
fi
2022-05-20 10:32:26 +02:00