#!/usr/bin/env bash # # Markdown inclusion generator that can be easily symlinked/copied by # Pandoc-compatible works. # # Parameters BASENAME="`basename $0`" DIRNAME="`dirname $0`" BASEDIR="$DIRNAME/.." HEADER="${2:-true}" # Header if [ "$HEADER" != "false" ]; then echo "# Bibliography sources" echo "# Automatically generated by $BASENAME" echo "bibliography:" fi # Compile #for file in *.bib; do find -name '*.bib' | sed -e 's|^./||' | while read file; do echo " - $file" done