aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-06-09 11:46:54 +0100
committerSilvio Rhatto <rhatto@riseup.net>2024-06-09 11:46:54 +0100
commit5002e0bc6af2a1e0a34014f372c5be40c66fab54 (patch)
treee821a502b867afdd37e2a936ac31a002898ad995 /bin
parent0978a5c17cd34c0c707a927ea9b1708297940017 (diff)
downloadbiblio-5002e0bc6af2a1e0a34014f372c5be40c66fab54.tar.gz
biblio-5002e0bc6af2a1e0a34014f372c5be40c66fab54.tar.bz2
Feat: improve _biblio.yml management so it can be easily included elsewhere
Diffstat (limited to 'bin')
-rwxr-xr-xbin/biblio-yml15
1 files changed, 10 insertions, 5 deletions
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