From 71ab2a7fb405c5b0394509ac81acfe35fe2c5ffb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 19 Jul 2018 02:33:30 +0200 Subject: [PATCH] bugfix: allow rime based update of meta file --- indexmeta.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indexmeta.sh b/indexmeta.sh index 45a3bac..37a617a 100644 --- a/indexmeta.sh +++ b/indexmeta.sh @@ -91,15 +91,16 @@ meta_dir(){ RELEASE "$meta" elif [ -d "$dir/.index" -a "$dir" -nt "$meta" ] && LOCK "$meta"; then - touch "$meta" + cp -p "$meta" "$meta.ref"; touch "$meta" find "$dir" -type f -mindepth 1 -maxdepth 1 \ | grep -aE "$file_pattern" \ | while read -r v; do - if [ "$v" -nt "$meta" ]; then + if [ "$v" -nt "$meta.ref" ]; then grep -qF " $(meta_name "$v")" "$meta" \ || meta_line "$v" fi done >>"$meta" + rm "$meta.ref" RELEASE "$meta" fi -- 2.39.2