aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/ipkg-build6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index 845a6ed04e..d38ba20af3 100755
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -15,8 +15,12 @@ FIND="${FIND:-$(which gfind)}"
TAR="${TAR:-$(which tar)}"
GZIP="$(which gzip)"
+# try to use fixed source epoch
+if [ -n "$SOURCE_DATE_EPOCH" ]; then
+ TIMESTAMP=$(date --date="@$SOURCE_DATE_EPOCH")
+
# look up date of last commit
-if [ -d "$TOPDIR/.git" ]; then
+elif [ -d "$TOPDIR/.git" ]; then
GIT="$(which git)"
TIMESTAMP=$(cd $TOPDIR; $GIT log -1 -s --format=%ci)
elif [ -d "$TOPDIR/.svn" ]; then