Create PDF from file in output dir when building all from what's inside lib/documentation.

This commit is contained in:
Igor Pecovnik 2016-06-24 16:26:44 +02:00
parent 8c5a86e7b1
commit 156d66f87d

View file

@ -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`