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