From 0465be083b6d235769551ae671cc58e3efd06fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20AKY=C3=9CZ?= Date: Sat, 30 Dec 2023 03:22:32 +0300 Subject: [PATCH] Make the duplicate matching case insensitive --- .local/bin/getbib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/getbib b/.local/bin/getbib index 4722ac86..3e6c19ab 100755 --- a/.local/bin/getbib +++ b/.local/bin/getbib @@ -36,7 +36,7 @@ process_doi() { printf "${red_color}%s${reset_color}\n" "$bibtex_entry" [ -z "$bibtex_entry" ] && [ "$(echo "$bibtex_entry" | cut -c2)" != "@" ] && echo "Failed to fetch bibtex entry for DOI: $doi" && return 1 - grep -Fq "doi = {${doi}}" "$BIB_FILE" || { + grep -iFq "doi = {${doi}}" "$BIB_FILE" || { [ -s "$BIB_FILE" ] && echo "" >> "$BIB_FILE" echo "$bibtex_entry" >> "$BIB_FILE" echo "Added bibtex entry for DOI: $doi"