diff options
author | volth <volth@webmaster.ms> | 2017-08-13 14:03:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 14:03:05 +0000 |
commit | 4ebeb7d78296b26eede37495a2674494290d14f8 (patch) | |
tree | a1e7f89179087ad80ac3c580bdcefc54bc30390b /pkgs/build-support | |
parent | b971f8de8e590e18151a709edf093ee735e090b6 (diff) | |
download | nixlib-4ebeb7d78296b26eede37495a2674494290d14f8.tar nixlib-4ebeb7d78296b26eede37495a2674494290d14f8.tar.gz nixlib-4ebeb7d78296b26eede37495a2674494290d14f8.tar.bz2 nixlib-4ebeb7d78296b26eede37495a2674494290d14f8.tar.lz nixlib-4ebeb7d78296b26eede37495a2674494290d14f8.tar.xz nixlib-4ebeb7d78296b26eede37495a2674494290d14f8.tar.zst nixlib-4ebeb7d78296b26eede37495a2674494290d14f8.zip |
use \0 instead of \n
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh b/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh index a2449b2704aa..6bf9a65b35af 100644 --- a/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh +++ b/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh @@ -4,7 +4,7 @@ updateSourceDateEpoch() { # Get the last modification time of all regular files, sort them, # and get the most recent. Maybe we should use # https://github.com/0-wiz-0/findnewest here. - local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ %p\n' | sort -n | tail -n1)) + local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ %p\0' | sort -n --zero-terminated | tail -n1 --zero-terminated)) local time="${res[0]//\.[0-9]*/}" # remove the fraction part local newestFile="${res[1]}" |