meta_line() {
local video l w h
video="$1"
+ [ "${video%.part}" = "$video" -a -s "$video" ] || return 0
read l h w <<__EOF
$(printf '' \
if [ -d "$dir/.index" -a \! -f "$meta" ] && LOCK "$meta"; then
touch "$meta" # preliminary touch to prevent concurrent generators
- find "$dir" -type f -mindepth 1 -maxdepth 1 \
+ find -L "$dir" -type f -mindepth 1 -maxdepth 1 \
| grep -aE "$file_pattern" \
| 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"
- find "$dir" -type f -newer "$metat" \
+ touch "$meta"
+ find -L "$dir" -type f -newer "$metat" \
-mindepth 1 -maxdepth 1 \
| grep -aE "$file_pattern" \
| while read -r v; do
grep -qF " $(meta_name "$v")" "$meta" \
|| meta_line "$v"
done >>"$meta"
- sort -u "$meta" >"$meta.ref"
- mv "$meta.ref" "$meta"
touch "$metat"
RELEASE "$meta"