👷 calamares.sh: acknowledge ISO version

This commit is contained in:
Vladislav Nepogodin committed 2024-10-11 14:53:06 +04:00
1 parent 107722b828
commit d9719b6085
1 file changed
+5 -9
@@ -45,13 +45,7 @@ Main() {
local progname local progname
progname="$(basename "$0")" progname="$(basename "$0")"
local log=/home/liveuser/cachy-install.log local log=/home/liveuser/cachy-install.log
local mode="" local mode=online # TODO: keep this line for now
case "$progname" in
calamares-online.sh) mode=online ;;
calamares-offline.sh) mode=offline ;;
esac
mode=online # keep this line for now!
local _efi_check_dir="/sys/firmware/efi" local _efi_check_dir="/sys/firmware/efi"
local _exitcode=2 # by default use grub local _exitcode=2 # by default use grub
@@ -73,6 +67,8 @@ Main() {
SYSTEM="BIOS/MBR SYSTEM" SYSTEM="BIOS/MBR SYSTEM"
fi fi
local ISO_VERSION="$(cat /etc/version-tag)"
echo "USING ISO VERSION: ${ISO_VERSION}"
if [[ "${_exitcode}" -eq 2 ]]; then if [[ "${_exitcode}" -eq 2 ]]; then
BOOTLOADER="GRUB" BOOTLOADER="GRUB"
@@ -107,7 +103,7 @@ Main() {
cat <<EOF > $log cat <<EOF > $log
########## $log by $progname ########## $log by $progname
########## Started (UTC): $(date -u "+%x %X") ########## Started (UTC): $(date -u "+%x %X")
########## Install mode: $mode ########## ISO version: $ISO_VERSION
########## System: $SYSTEM ########## System: $SYSTEM
########## Bootloader: $BOOTLOADER ########## Bootloader: $BOOTLOADER
EOF EOF
@@ -117,7 +113,7 @@ EOF
sudo -E dbus-launch calamares -D6 >> $log & sudo -E dbus-launch calamares -D6 >> $log &
# comment out the following line if pacman.log is not needed: # comment out the following line if pacman.log is not needed:
[ "$mode" = "online" ] && catch_chrooted_pacman_log "$progname" catch_chrooted_pacman_log "$progname"
} }
Main "$@" Main "$@"