2021-09-15 07:35:02 +02:00
|
|
|
#!/usr/bin/env bash
|
2023-01-27 08:22:33 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2021-09-15 07:35:02 +02:00
|
|
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
2022-03-28 20:51:10 +02:00
|
|
|
. /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
|
2023-06-30 07:20:04 +02:00
|
|
|
. /usr/lib/archboot/update/update.sh
|
2023-08-01 16:32:34 +02:00
|
|
|
. /usr/lib/archboot/update/manage.sh
|
|
|
|
. /usr/lib/archboot/update/desktop.sh
|
2023-06-30 07:20:04 +02:00
|
|
|
. /usr/lib/archboot/update/xfce.sh
|
|
|
|
. /usr/lib/archboot/update/gnome.sh
|
|
|
|
. /usr/lib/archboot/update/gnome-wayland.sh
|
|
|
|
. /usr/lib/archboot/update/plasma.sh
|
|
|
|
. /usr/lib/archboot/update/plasma-wayland.sh
|
2023-07-10 11:02:26 +02:00
|
|
|
. /usr/lib/archboot/update/sway.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
|
2023-01-28 08:17:52 +01:00
|
|
|
-u|--u|-update|--update) _D_SCRIPTS="1" ;;
|
2022-04-30 08:47:58 +02:00
|
|
|
-latest|--latest) _L_COMPLETE="1" ;;
|
|
|
|
-latest-install|--latest-install) _L_INSTALL_COMPLETE="1";;
|
|
|
|
-latest-image|--latest-image) _G_RELEASE="1" ;;
|
2022-06-06 12:19:44 +02:00
|
|
|
-xfce|--xfce) _L_XFCE="1" ;;
|
2023-07-10 10:48:42 +02:00
|
|
|
-sway|--sway) _L_SWAY="1" ;;
|
2022-06-06 12:19:44 +02:00
|
|
|
-gnome|--gnome) _L_GNOME="1";;
|
2022-05-28 22:38:41 +02:00
|
|
|
-gnome-wayland|--gnome-wayland) _L_GNOME_WAYLAND="1";;
|
2022-06-06 12:19:44 +02:00
|
|
|
-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" ;;
|
2022-05-29 08:43:53 +02:00
|
|
|
-custom-wayland|--custom-wayland) _CUSTOM_WAYLAND="1" ;;
|
2023-01-28 08:17:52 +01:00
|
|
|
-full-system|--full-system) _FULL_SYSTEM="1" ;;
|
2023-01-28 08:21:42 +01:00
|
|
|
-h|--h|-help|--help|?) usage ;;
|
2022-04-30 08:47:58 +02:00
|
|
|
*) usage ;;
|
|
|
|
esac
|
|
|
|
shift
|
2021-09-22 09:02:56 +02:00
|
|
|
done
|
2022-04-25 15:11:54 +02:00
|
|
|
_archboot_check
|
|
|
|
_download_latest
|
2021-09-22 09:02:56 +02:00
|
|
|
# Generate new environment and launch it with kexec
|
2023-01-09 18:23:25 +01:00
|
|
|
if [[ -n "${_L_COMPLETE}" || -n "${_L_INSTALL_COMPLETE}" ]]; then
|
2023-07-31 12:16:00 +02:00
|
|
|
_TITLE="Archboot $(uname -m) | Basic Setup | New Environment"
|
2023-08-02 15:07:54 +02:00
|
|
|
_new_environment | _dialog --title "${_MENU_TITLE}" --gauge "Waiting for pacman keyring..." 6 75 0
|
2023-08-02 15:39:16 +02:00
|
|
|
clear
|
2021-09-22 09:02:56 +02:00
|
|
|
fi
|
|
|
|
# Generate new images
|
2023-01-09 18:23:25 +01:00
|
|
|
if [[ -n "${_G_RELEASE}" ]]; then
|
2023-08-01 14:05:31 +02:00
|
|
|
_TITLE="Archboot $(uname -m) | Basic Setup | New Images"
|
2023-08-02 15:07:54 +02:00
|
|
|
_new_image | _dialog --title "${_MENU_TITLE}" --gauge "Removing not necessary files from /..." 6 75 0
|
2023-08-02 15:39:16 +02:00
|
|
|
clear
|
2021-09-22 09:02:56 +02:00
|
|
|
fi
|
2022-05-29 08:43:53 +02:00
|
|
|
# install custom xorg or wayland
|
2023-01-09 18:23:25 +01:00
|
|
|
if [[ -n "${_CUSTOM_X}" || -n "${_CUSTOM_WAYLAND}" ]]; then
|
2022-10-09 09:38:43 +02:00
|
|
|
_custom_wayland_xorg
|
2022-05-22 11:27:43 +02:00
|
|
|
fi
|
2022-05-29 08:43:53 +02:00
|
|
|
# Gnome, KDE/PLASMA or XFCE launch
|
2023-07-10 11:01:05 +02:00
|
|
|
if [[ -n "${_L_XFCE}" || -n "${_L_SWAY}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" || -n "${_L_GNOME_WAYLAND}" || -n "${_L_PLASMA_WAYLAND}" ]]; then
|
2022-10-09 09:38:43 +02:00
|
|
|
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
|
2022-06-02 19:11:04 +02:00
|
|
|
else
|
2022-10-09 09:38:43 +02:00
|
|
|
_install_graphic
|
2022-06-02 19:11:04 +02:00
|
|
|
fi
|
2022-05-03 11:01:16 +02:00
|
|
|
fi
|
2022-10-08 18:44:57 +02:00
|
|
|
# Switch to full Arch Linux system
|
2023-01-09 18:23:25 +01:00
|
|
|
if [[ -n "${_FULL_SYSTEM}" ]]; then
|
2023-08-01 12:31:43 +02:00
|
|
|
_TITLE="Archboot $(uname -m) | Basic Setup | Full System"
|
2023-08-02 15:07:54 +02:00
|
|
|
_full_system | _dialog --title "${_MENU_TITLE}" --gauge "Refreshing pacman package database..." 6 75 0
|
2023-08-02 15:39:16 +02:00
|
|
|
clear
|
2022-10-06 22:55:35 +02:00
|
|
|
fi
|
2023-08-02 13:43:33 +02:00
|
|
|
rm /.update
|