From 5002e0bc6af2a1e0a34014f372c5be40c66fab54 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 9 Jun 2024 11:46:54 +0100 Subject: Feat: improve _biblio.yml management so it can be easily included elsewhere --- bin/biblio-yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/biblio-yml b/bin/biblio-yml index af8695c..0cb9cd6 100755 --- a/bin/biblio-yml +++ b/bin/biblio-yml @@ -8,16 +8,21 @@ BASENAME="`basename $0`" DIRNAME="`dirname $0`" BASEDIR="$DIRNAME/.." +PREFIX="${1:-biblio}" +HEADER="${2:-false}" # Go to main folder cd $BASEDIR # Header -echo "# Bibliography sources" -echo "# Automatically generated by $BASENAME" -echo "bibliography:" +if [ "$HEADER" != "false" ]; then + echo "# Bibliography sources" + echo "# Automatically generated by $BASENAME" + echo "bibliography:" +fi # Compile -for file in *.bib; do - echo " - biblio/$file" +#for file in *.bib; do +find -name '*.bib' | sed -e 's|^./||' | while read file; do + echo " - $PREFIX/$file" done -- cgit v1.2.3