Commit ef22430b authored by User expired's avatar User expired Committed by User expired
Browse files

bib-merge: Speed up check for correct key

parent d2dbbf72
......@@ -150,8 +150,11 @@ do
continue
fi
# Check the citation key.
if bib-keyinsert -n "$file" \
# Check the citation key (a quick and a thorough test).
if bib-keyinsert -s -n "$file" \
| sed '/^=== /{s/^/\n/;s/»[^«]*«/»'"$key"'«/}' \
| egrep -q '(^$|.)' \
&& bib-keyinsert -n "$file" \
| sed '/^=== /{s/^/\n/;s/»[^«]*«/»'"$key"'«/}' \
| egrep --color=none '(^$|.)'
then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment