diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-09-20 14:40:19 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-09-20 14:40:19 +0200 |
commit | 3a238f27b660d2fec8e274907aad4a8e3bc24e57 (patch) | |
tree | ee00a1e0fb53fbcde341a9267442d21073eec87a /gendocs.sh | |
parent | b919b385f5b7d3e2f41855d742c1e818ae95bd02 (diff) |
Add version number to resulting pdf filename
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'gendocs.sh')
-rwxr-xr-x | gendocs.sh | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,6 @@ #!/bin/bash -OUTFILENAME="xds-UsersGuide" +OUTFILENAME="XDS_UsersGuide" SCRIPT=$(basename $BASH_SOURCE) @@ -63,7 +63,8 @@ if [ "$DO_ACTION" = "pdf" -o "$DO_ACTION" = "serve" ]; then # Update cover when book.json has been changed [[ $ROOTDIR/book.json -nt $ROOTDIR/docs/cover.jpg ]] && { echo "Update cover files"; $ROOTDIR/docs/resources/make_cover.sh || exit 1; } - OUTFILE=$OUT_DIR/$OUTFILENAME.pdf + VERSION="_v$(grep '"version":' $ROOTDIR/book.json | cut -d'"' -f 4)" + OUTFILE=$OUT_DIR/$OUTFILENAME$VERSION.pdf $DRY $GITBOOK pdf $ROOTDIR $OUTFILE $DEBUG_FLAG [ "$?" = "0" ] && echo "PDF has been successfully generated in $OUTFILE" else |