From 4ca45f229b69e6e74c315a0c3e003a5917cc62a8 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 17 Sep 2017 09:03:37 +0200 Subject: set-source-date-epoch-to-latest.sh: shut up a warning > bash: warning: command substitution: ignored null byte in input /cc #28227. Also break the overlong line. --- pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkgs/build-support') 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 6bf9a65b35af..84e40cd0514f 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,8 @@ 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\0' | sort -n --zero-terminated | tail -n1 --zero-terminated)) + local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ %p\0' \ + | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)) local time="${res[0]//\.[0-9]*/}" # remove the fraction part local newestFile="${res[1]}" -- cgit 1.4.1