aboutsummaryrefslogtreecommitdiffstats
path: root/gendocs.sh
diff options
context:
space:
mode:
authorCorentinLGS <corentinlgs@gmail.com>2018-08-31 09:39:04 +0200
committerCorentinLGS <corentinlgs@gmail.com>2018-08-31 09:46:55 +0200
commit408acbdce381f1e70985eae9f96d036689f3d0aa (patch)
tree0a685d54dd62edebc4104ff838bb8e16decfec9a /gendocs.sh
parenta02a1627a954432cc65ec981cada8ba420d7ad2f (diff)
app-framework-binder doc: Changed doc to fit new format.flounder_5.99.5flounder/5.99.55.99.5
-Split book.json in 2. -Deleted unwanted files. -Changed all links to .html files to .md files in the SUMMARY.md, it is used by gitbook to build the pdf and as gitbook doesn't handle .html files I had to change it. Change-Id: I15705ef0f0d9143971c046ccb72a4eee04b98890 Signed-off-by: CorentinLGS <corentinlgs@gmail.com>
Diffstat (limited to 'gendocs.sh')
-rwxr-xr-xgendocs.sh83
1 files changed, 0 insertions, 83 deletions
diff --git a/gendocs.sh b/gendocs.sh
deleted file mode 100755
index 0052748d..00000000
--- a/gendocs.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-
-OUTFILENAME="Application-Framework-Binder-Guide"
-
-SCRIPT=$(basename $BASH_SOURCE)
-
-VERSION=$(grep '"version":' $(dirname $BASH_SOURCE)/book.json | cut -d'"' -f 4)
-[ "$VERSION" != "" ] && OUTFILENAME="${OUTFILENAME}_${VERSION}"
-
-
-function usage() {
- cat <<EOF >&2
-Usage: $SCRIPT [options] [pdf|serve|doxygen]
-
-Options:
- --debug
- enable debug when generating pdf or html documentation
- -d|--dry
- dry run
- -h|--help
- get this help
-
-Example:
- $SCRIPT pdf
-
-EOF
- exit 1
-}
-
-function info() {
- echo "$@" >&2
-}
-
-#default values
-DEBUG_FLAG=""
-DRY=""
-DO_ACTION=""
-OUT_DIR=./build
-
-[[ $? != 0 ]] && usage
-while [ $# -gt 0 ]; do
- case "$1" in
- --debug) DEBUG_FLAG="--log=debug --debug";;
- -d|--dry) DRY=echo;;
- -h|--help) usage;;
- pdf | serve | doxygen) DO_ACTION=$1;;
- --) break;;
- esac
- shift
-done
-
-cd $(dirname $0)
-ROOTDIR=`pwd -P`
-
-# Create out dir if needed
-[ -d $OUT_DIR ] || mkdir -p $OUT_DIR
-
-if [ "$DO_ACTION" = "pdf" -o "$DO_ACTION" = "serve" ]; then
- GITBOOK=`which gitbook`
- [ "$?" = "1" ] && { echo "You must install gitbook first, using: sudo npm install -g gitbook-cli"; exit 1; }
-
- EBCONV=`which ebook-convert`
- [ "$?" = "1" ] && { echo "You must install calibre first, using: 'sudo apt install calibre' or refer to https://calibre-ebook.com/download"; exit 1; }
-
- if [ "$DO_ACTION" = "pdf" ]; 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
- $DRY $GITBOOK pdf $ROOTDIR $OUTFILE $DEBUG_FLAG
- [ "$?" = "0" ] && echo "PDF has been successfully generated in $OUTFILE"
- else
- $DRY $GITBOOK serve $DEBUG_FLAG
- fi
-
-elif [ "$DO_ACTION" = "doxygen" ]; then
- $DRY cd $OUT_DIR && cmake .. && make doxygen $ROOTDIR/Doxyfile
-
-else
- echo "Unknown action !"
- usage
-fi