Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/mkarchiso
diff options
context:
space:
mode:
authorDavid Runge <dvzrv@archlinux.org>2021-11-02 20:06:40 +0100
committerDavid Runge <dvzrv@archlinux.org>2021-11-02 20:06:40 +0100
commit2f207fdafc1026ec4f3fa19237876a478c626864 (patch)
treeb556f1b6f7f4a30c022bb3de9232ebb3a74af585 /archiso/mkarchiso
parenta37c320a34b6a32a31f338e2f9b504ef46365c9c (diff)
parentf8862c26219774e7e900d2464dd0ff51cbbd6311 (diff)
Merge remote-tracking branch 'nl6720/date'
* nl6720/date: mkarchiso: replace external date command with printf
Diffstat (limited to 'archiso/mkarchiso')
-rwxr-xr-xarchiso/mkarchiso5
1 files changed, 3 insertions, 2 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 6181af2..9a310c7 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -7,7 +7,8 @@ set -e -u
# Control the environment
umask 0022
export LC_ALL="C"
-export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-"$(date +%s)"}"
+[[ -v SOURCE_DATE_EPOCH ]] || printf -v SOURCE_DATE_EPOCH '%(%s)T' -1
+export SOURCE_DATE_EPOCH
# Set application name from the script's file name
app_name="${0##*/}"
@@ -113,7 +114,7 @@ ENDUSAGETEXT
# Shows configuration options.
_show_config() {
local build_date
- build_date="$(date --utc --iso-8601=seconds -d "@${SOURCE_DATE_EPOCH}")"
+ printf -v build_date '%(%FT%R%z)T' "${SOURCE_DATE_EPOCH}"
_msg_info "${app_name} configuration settings"
_msg_info " Architecture: ${arch}"
_msg_info " Working directory: ${work_dir}"