From 385ecd18cc569f103a37e85045de6b0d752095d2 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Wed, 1 Mar 2023 01:31:45 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20honor=20SOURCE=5FDATE=5FEPOCH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref: 6e50a3024c6d987d514955f707376ed88c08c547 --- util-iso.sh | 2 +- util.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/util-iso.sh b/util-iso.sh index e6e67b0..437f070 100755 --- a/util-iso.sh +++ b/util-iso.sh @@ -146,7 +146,7 @@ run_build() { sudo chown $USER $outFolder cp ${work_dir}/iso/arch/pkglist.x86_64.txt "$outFolder/$_profile/$(gen_iso_fn).pkgs.txt" - mv "$outFolder/$_profile/cachyos-$(date +%Y.%m.%d)-x86_64.iso" "$outFolder/$_profile/${iso_file}" + mv "$outFolder/$_profile/cachyos-$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)-x86_64.iso" "$outFolder/$_profile/${iso_file}" msg "Done [Build ISO] ${iso_file}" msg "Finished building [%s]" "${_profile}" diff --git a/util.sh b/util.sh index 046ff81..031d524 100755 --- a/util.sh +++ b/util.sh @@ -95,5 +95,10 @@ sign_with_key() { msg2 "signing [%s] with key %s" "${1##*/}" "${GPGKEY}" [[ -e "$1".sig ]] && rm "$1".sig - gpg --detach-sign --use-agent -u "${GPGKEY}" "$1" + + local SIGNWITHKEY=() + if [[ -n $GPGKEY ]]; then + SIGNWITHKEY=(-u "${GPGKEY}") + fi + gpg --detach-sign --use-agent "${SIGNWITHKEY[@]}" "$1" }