diff options
Diffstat (limited to 'bin/compile-notes')
-rwxr-xr-x | bin/compile-notes | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/compile-notes b/bin/compile-notes index 02a9420..24c98ea 100755 --- a/bin/compile-notes +++ b/bin/compile-notes @@ -8,6 +8,7 @@ BASENAME="`basename $0 | sed -e 's/\(.\)/\U\1/'`" DIRNAME="`dirname $0`" BASEDIR="$DIRNAME/.." STRUCTURE="structure/notes" +CONTENT="content/notes" OUTPUT="${1:-notes}" REVISION="$2" DATE="$3" @@ -37,10 +38,12 @@ for file in $BASEDIR/$STRUCTURE/00*.md; do done # Content -find content/notes -type f | grep '\.md$' | sort | while read file; do - cat $file >> $OUTPUT.md - echo "" >> $OUTPUT.md -done +if [ -d "$CONTENT" ]; then + find $CONTENT -type f | grep '\.md$' | sort | while read file; do + cat $file >> $OUTPUT.md + echo "" >> $OUTPUT.md + done +fi # Bibliography section cat $BASEDIR/templates/notes/bibliography.md >> $OUTPUT.md |