mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
set-source-date-epoch-to-latest: fix warning
If there was no older file than $NIX_BUILD_TOP this would result in a warning, e.g. with nix-info. ``` /nix/store/15kgcm8hnd99p7plqzx7p4lcr2jni4df-set-source-date-epoch-to-latest.sh: line 13: [: : integer expression expected ```
This commit is contained in:
parent
8e97e8009f
commit
34faed5bb0
@ -10,7 +10,7 @@ updateSourceDateEpoch() {
|
||||
local newestFile="${res[1]}"
|
||||
|
||||
# Update $SOURCE_DATE_EPOCH if the most recent file we found is newer.
|
||||
if [ "$time" -gt "$SOURCE_DATE_EPOCH" ]; then
|
||||
if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then
|
||||
echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"
|
||||
export SOURCE_DATE_EPOCH="$time"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user