From 52491fbf948ede0e4e206938d2410ec4eb4159f0 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 17 Mar 2024 16:20:19 +0300 Subject: [PATCH] #1 check for emptiness --- entry.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/entry.sh b/entry.sh index 5b18028..4c88b95 100755 --- a/entry.sh +++ b/entry.sh @@ -31,6 +31,11 @@ read -r -a opts <<< "${INPUT_OPTS}" bibs=$(find . -name '*.bib') +if [ -z "${bibs}" ]; then + echo "There are no .bib files in the repository" + exit +fi + echo "${bibs}" | while IFS= read -r bib; do bibcop.pl "${opts[@]}" "${bib}" done