From: Paul Hänsch Date: Mon, 4 Jan 2021 20:07:08 +0000 (+0100) Subject: omit sorting of meta file; provide time marks for newly generated meta files X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=61933758148caee332ab0ca95f1a2feccd612b5e;p=serve0 omit sorting of meta file; provide time marks for newly generated meta files --- diff --git a/indexmeta.sh b/indexmeta.sh index e478324..43e360d 100644 --- a/indexmeta.sh +++ b/indexmeta.sh @@ -88,10 +88,11 @@ meta_dir(){ | while read -r v; do meta_line "$v" done >"$meta" + touch "$metat" RELEASE "$meta" elif [ -d "$dir/.index" -a "$dir" -nt "$metat" ] && LOCK "$meta"; then - cp -p "$meta" "$meta.ref"; touch "$meta" + touch "$meta" find "$dir" -type f -newer "$metat" \ -mindepth 1 -maxdepth 1 \ | grep -aE "$file_pattern" \ @@ -99,8 +100,6 @@ meta_dir(){ grep -qF " $(meta_name "$v")" "$meta" \ || meta_line "$v" done >>"$meta" - sort -u "$meta" >"$meta.ref" - mv "$meta.ref" "$meta" touch "$metat" RELEASE "$meta"