summaryrefslogtreecommitdiffstats
path: root/gendocs.sh
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-09-20 18:43:07 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-09-20 18:43:07 +0200
commit91baca1e612e8323885dfcfe17267a96527fa3c5 (patch)
treec6328c0478d58e1a5e64ba280c930bfa80ac8c03 /gendocs.sh
parent2a0ac96c8e5b510c3767ff054156f17c67225a62 (diff)
doc: Changed doc to new formatguppy_6.90.0guppy/6.90.06.90.0
- fixed image width setting - split book.json to match new format - changed description in README.md - remove useless files Change-Id: I9b0b863715585659f32a9f6c3005c1bbf15009f4 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'gendocs.sh')
-rwxr-xr-xgendocs.sh85
1 files changed, 0 insertions, 85 deletions
diff --git a/gendocs.sh b/gendocs.sh
deleted file mode 100755
index f84e116..0000000
--- a/gendocs.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-
-OUTFILENAME="Application-Framework-Service-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:-1}
-}
-
-function info() {
- echo "$@" >&2
-}
-
-function error() {
- info "error:" "$@"
- exit 1
-}
-
-#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 0;;
- 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` || error "You must install gitbook first, using: sudo npm install -g gitbook-cli"
- EBCONV=`which ebook-convert` || error "You must install calibre first, using: 'sudo apt install calibre' or refer to https://calibre-ebook.com/download"
-
- 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