mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
👷 adjust calamares scripts for AI edition
This commit is contained in:
2 files changed
+57
-8
No files matched your search
+57
@@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
FollowFile() {
|
||||||
|
local tailfile="$1"
|
||||||
|
local term_title="$2"
|
||||||
|
|
||||||
|
alacritty -t "$term_title" -e tail -f "$tailfile" &
|
||||||
|
}
|
||||||
|
|
||||||
|
catch_chrooted_pacman_log() {
|
||||||
|
local pacmanlog=""
|
||||||
|
local lockfile="$HOME/.$1.lck"
|
||||||
|
|
||||||
|
# wait until pacman.log is available in the chrooted system, then follow the log in background
|
||||||
|
while true ; do
|
||||||
|
sleep 2
|
||||||
|
pacmanlog="$(/usr/bin/ls -1 /tmp/calamares-root-*/var/log/pacman.log 2>/dev/null | /usr/bin/tail -n 1)"
|
||||||
|
if [ -n "$pacmanlog" ] ; then
|
||||||
|
# pacman.log found
|
||||||
|
[ -r "$lockfile" ] && return
|
||||||
|
/usr/bin/touch "$lockfile"
|
||||||
|
FollowFile "$pacmanlog" "Pacman log" 400 50
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
Main() {
|
||||||
|
local progname="$(basename "$0")"
|
||||||
|
local log="/home/liveuser/cachy-install.log"
|
||||||
|
local _efi_check_dir="/sys/firmware/efi"
|
||||||
|
|
||||||
|
if [ ! -d "${_efi_check_dir}" ]; then
|
||||||
|
notify-send --app-name='CachyOS Welcome' 'MBR/BIOS system is not supported for AI Edition'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
||||||
|
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
||||||
|
yes | sudo pacman -R cachyos-calamares-qt6-next-refind
|
||||||
|
yes | sudo pacman -Sy cachyos-calamares-qt6-next-ai
|
||||||
|
|
||||||
|
cat <<EOF > $log
|
||||||
|
########## $log by $progname
|
||||||
|
########## Started (UTC): $(date -u "+%x %X")
|
||||||
|
########## Edition: AI Edition
|
||||||
|
EOF
|
||||||
|
FollowFile "$log" "Install log" 20 20
|
||||||
|
|
||||||
|
sudo cp /usr/share/calamares/settings_${mode}.conf /etc/calamares/settings.conf
|
||||||
|
sudo -E dbus-launch calamares -D6 >> $log &
|
||||||
|
|
||||||
|
# comment out the following line if pacman.log is not needed:
|
||||||
|
catch_chrooted_pacman_log "$progname"
|
||||||
|
}
|
||||||
|
|
||||||
|
Main "$@"
|
||||||
@@ -51,7 +51,6 @@ Main() {
|
|||||||
--button="Grub:2" \
|
--button="Grub:2" \
|
||||||
--button="Systemd-boot:3" \
|
--button="Systemd-boot:3" \
|
||||||
--button="Refind:4" \
|
--button="Refind:4" \
|
||||||
--button="AI SDK (NVIDIA):5" \
|
|
||||||
--text "Choose Bootloader/Edition:" ; echo $?)
|
--text "Choose Bootloader/Edition:" ; echo $?)
|
||||||
else
|
else
|
||||||
SYSTEM="BIOS/MBR SYSTEM"
|
SYSTEM="BIOS/MBR SYSTEM"
|
||||||
@@ -77,13 +76,6 @@ Main() {
|
|||||||
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
||||||
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
||||||
yes | sudo pacman -Sy cachyos-calamares-qt6-next-refind
|
yes | sudo pacman -Sy cachyos-calamares-qt6-next-refind
|
||||||
elif [[ "${_exitcode}" -eq 5 ]]; then
|
|
||||||
BOOTLOADER="REFIND"
|
|
||||||
echo "USING REFIND!"
|
|
||||||
yes | sudo pacman -R cachyos-calamares-qt6-next-grub
|
|
||||||
yes | sudo pacman -R cachyos-calamares-qt6-next-systemd
|
|
||||||
yes | sudo pacman -R cachyos-calamares-qt6-next-refind
|
|
||||||
yes | sudo pacman -Sy cachyos-calamares-qt6-next-ai
|
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user