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 \
| grep -aE "$file_pattern" \
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 \
| grep -aE "$file_pattern" \