From 156d66f87dfb737e41d742bba8c9839eab5c0e01 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 24 Jun 2016 16:26:44 +0200 Subject: [PATCH] Create PDF from file in output dir when building all from what's inside lib/documentation. --- build-all.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build-all.sh b/build-all.sh index 939efd6d0..f195b0820 100644 --- a/build-all.sh +++ b/build-all.sh @@ -18,6 +18,13 @@ from=0 RELEASE_LIST=("trusty" "xenial" "wheezy" "jessie") BRANCH_LIST=("default" "next" "dev") +# add dependencies for converting .md to .pdf +if [[ ! -f /etc/apt/sources.list.d/nodesource.list ]]; then + curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - + apt-get install -y libfontconfig1 nodejs + npm install -g markdown-pdf +fi + create_images_list() { for board in $SRC/lib/config/boards/*.conf; do @@ -93,6 +100,10 @@ for line in "${buildlist[@]}"; do done echo -e "\n${#buildlist[@]} total\n" +# create PDF from files inside lib/documentation +temprevision=$(cat $SRC/lib/configuration.sh | grep REVISION | grep -o '".*"' | sed 's/"//g' | cut -f1 -d"$") +markdown-pdf $SRC/lib/documentation/*.md -o "$DEST/images/Armbian_"$temprevision"_documentations.pdf" + [[ $BUILD_ALL == demo ]] && exit 0 buildall_start=`date +%s`