diff options
-rwxr-xr-x | scripts/ipkg-build | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/ipkg-build b/scripts/ipkg-build index e42da2ecbc..21127f3391 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 |