👷 util-iso: generate version tag to check ISO version

This commit is contained in:
Vladislav Nepogodin committed 2024-10-11 14:42:47 +04:00
1 parent 1253c086a0
commit 107722b828
1 file changed
+13 -1
+13 -1
View File
@@ -100,6 +100,14 @@ EOF
fi fi
} }
generate_version_tag() {
local _profile="$1"
local _version="$2"
if [ "$_profile" == "desktop" ]; then
echo "${_version}" > ${src_dir}/archiso/airootfs/etc/version-tag
fi
}
modify_mkarchiso() { modify_mkarchiso() {
local _is_hack_applied="$(grep -q 'archlinux-keyring-wkd-sync.timer' /usr/bin/mkarchiso; echo $?)" local _is_hack_applied="$(grep -q 'archlinux-keyring-wkd-sync.timer' /usr/bin/mkarchiso; echo $?)"
if [ $_is_hack_applied -ne 0 ]; then if [ $_is_hack_applied -ne 0 ]; then
@@ -116,7 +124,8 @@ prepare_profile(){
info "Profile: [%s]" "${profile}" info "Profile: [%s]" "${profile}"
change_grub_version "$(date +%y%m%d)" local _iso_version="$(date +%y%m%d)"
change_grub_version "${_iso_version}"
# Fetch up-to-date version of CachyOS repo mirrorlist # Fetch up-to-date version of CachyOS repo mirrorlist
fetch_cachyos_mirrorlist fetch_cachyos_mirrorlist
@@ -133,6 +142,9 @@ prepare_profile(){
generate_environment "${profile}" generate_environment "${profile}"
# Write out version to be able to check ISO version
generate_version_tag "${profile}" "${_iso_version}"
iso_file=$(gen_iso_fn).iso iso_file=$(gen_iso_fn).iso
} }