11#! /bin/bash
22
3- Main () {
3+ main () {
44 # Remove current keyring first, to complete initiate it
55 sudo rm -rf /etc/pacman.d/gnupg
66 # We are using this, because archlinux is signing the keyring often with a newly created keyring
@@ -21,87 +21,31 @@ Main() {
2121 local log=" /home/liveuser/cachy-install.log"
2222 local mode=" online" # TODO: keep this line for now
2323
24- local _efi_check_dir=" /sys/firmware/efi"
25- local _exitcode=2 # by default use grub
26-
2724 local SYSTEM=" "
28- local BOOTLOADER= " "
29- if [ -d " ${_efi_check_dir} " ]; then
25+
26+ if [ -d /sys/firmware/efi ]; then
3027 SYSTEM=" UEFI SYSTEM"
31- _exitcode=$( yad --width 300 --title " Bootloader" \
32- --image=gnome-shutdown \
33- --button=" Grub:2" \
34- --button=" Systemd-boot(Default):3" \
35- --button=" Refind:4" \
36- --button=" AI SDK / Refind:5" \
37- --button=" Limine:6" \
38- --text " Choose Bootloader/Edition:" ; echo $? )
3928 else
4029 SYSTEM=" BIOS/MBR SYSTEM"
41- _exitcode=$( yad --width 300 --title " Bootloader" \
42- --image=gnome-shutdown \
43- --button=" Grub:2" \
44- --button=" Limine:6" \
45- --text " Choose Bootloader/Edition:" ; echo $? )
4630 fi
4731
4832 local ISO_VERSION=" $( cat /etc/version-tag) "
4933 echo " USING ISO VERSION: ${ISO_VERSION} "
5034
51- if [[ " ${_exitcode} " -eq 2 ]]; then
52- BOOTLOADER=" GRUB"
53- echo " USING GRUB!"
54- yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
55- yes | sudo pacman -R cachyos-calamares-qt6-next-grub
56- yes | sudo pacman -R cachyos-calamares-qt6-next-refind
57- yes | sudo pacman -R cachyos-calamares-qt6-next-limine
58- yes | sudo pacman -Sy cachyos-calamares-qt6-next-grub
59- elif [[ " ${_exitcode} " -eq 3 ]]; then
60- BOOTLOADER=" SYSTEMD-BOOT"
61- echo " USING SYSTEMD-BOOT!"
62- yes | sudo pacman -R cachyos-calamares-qt6-next-grub
63- yes | sudo pacman -R cachyos-calamares-qt6-next-refind
64- yes | sudo pacman -R cachyos-calamares-qt6-next-limine
65- yes | sudo pacman -Sy cachyos-calamares-qt6-next-systemd
66- elif [[ " ${_exitcode} " -eq 4 ]]; then
67- BOOTLOADER=" REFIND"
68- echo " USING REFIND!"
69- yes | sudo pacman -R cachyos-calamares-qt6-next-grub
70- yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
71- yes | sudo pacman -R cachyos-calamares-qt6-next-limine
72- yes | sudo pacman -Sy cachyos-calamares-qt6-next-refind
73- elif [[ " ${_exitcode} " -eq 5 ]]; then
74- BOOTLOADER=" AI-SDK/Refind"
75- echo " USING AI SDK and Refind!"
76- yes | sudo pacman -R cachyos-calamares-qt6-next-grub
77- yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
78- yes | sudo pacman -R cachyos-calamares-qt6-next-refind
79- yes | sudo pacman -R cachyos-calamares-qt6-next-limine
80- yes | sudo pacman -Sy cachyos-calamares-qt6-next-ai
81- elif [[ " ${_exitcode} " -eq 6 ]]; then
82- BOOTLOADER=" Limine"
83- echo " USING Limine"
84- yes | sudo pacman -R cachyos-calamares-qt6-next-grub
85- yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
86- yes | sudo pacman -R cachyos-calamares-qt6-next-refind
87- yes | sudo pacman -Sy cachyos-calamares-qt6-next-limine
88- else
89- exit
90- fi
35+ sudo pacman -Sy --noconfirm cachyos-calamares-next
9136
9237 # Get Hardware Informations
93- inxi -F > $log
38+ inxi -F > " $log "
9439
95- cat << EOF >> $log
40+ cat << EOF >> " $log "
9641########## $log by $progname
9742########## Started (UTC): $( date -u " +%x %X" )
9843########## ISO version: $ISO_VERSION
9944########## System: $SYSTEM
100- ########## Bootloader: $BOOTLOADER
10145EOF
10246
10347 sudo cp " /usr/share/calamares/settings_${mode} .conf" /etc/calamares/settings.conf
10448 sudo -E dbus-launch calamares -D6 >> $log &
10549}
10650
107- Main " $@ "
51+ main " $@ "
0 commit comments