From 107722b82865d208a03d37bca4f5f5010d136f0a Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Fri, 11 Oct 2024 14:42:47 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20util-iso:=20generate=20version?= =?UTF-8?q?=20tag=20to=20check=20ISO=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util-iso.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/util-iso.sh b/util-iso.sh index 9ecf038..a3b12c6 100755 --- a/util-iso.sh +++ b/util-iso.sh @@ -100,6 +100,14 @@ EOF 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() { local _is_hack_applied="$(grep -q 'archlinux-keyring-wkd-sync.timer' /usr/bin/mkarchiso; echo $?)" if [ $_is_hack_applied -ne 0 ]; then @@ -116,7 +124,8 @@ prepare_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_cachyos_mirrorlist @@ -133,6 +142,9 @@ prepare_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 }