diff options
Diffstat (limited to 'bin/biblio-yml')
-rwxr-xr-x | bin/biblio-yml | 15 |
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 |