From fb4ebffc20f19d22cbfd4bd297aeb13d734290dd Mon Sep 17 00:00:00 2001 From: Alexis Date: Thu, 21 Nov 2024 17:19:13 -0800 Subject: [PATCH] added check for SOURCE_DATE_EPOCH --- src/appimagetool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/appimagetool.c b/src/appimagetool.c index c5e56aa..84c33eb 100644 --- a/src/appimagetool.c +++ b/src/appimagetool.c @@ -188,8 +188,11 @@ int sfs_mksquashfs(char *source, char *destination, int offset) { args[i++] = exclude_file; } - args[i++] = "-mkfs-time"; - args[i++] = "0"; + // don't override time if user sets it + if (!getenv("SOURCE_DATE_EPOCH")) { + args[i++] = "-mkfs-time"; + args[i++] = "0"; + } for (guint sqfs_opts_idx = 0; sqfs_opts_idx < sqfs_opts_len; ++sqfs_opts_idx) { args[i++] = sqfs_opts[sqfs_opts_idx];