forked from connectomicslab/connectomemapper3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_docs.sh
More file actions
44 lines (36 loc) · 1.26 KB
/
build_docs.sh
File metadata and controls
44 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/bash
# Copyright (C) 2009-2021, Ecole Polytechnique Federale de Lausanne (EPFL) and
# Hospital Center and University of Lausanne (UNIL-CHUV), Switzerland, and CMP3 contributors
# All rights reserved.
#
# This software is distributed under the open-source license Modified BSD.
# Build the documentation using BASH shell interpreter and Sphinx doc generator.
#
# All python packages related to Sphinx necessary to build the docs
# are provided in the `py37cmp-gui` conda environment described by
# `environment.yml` / `environment_macosx.yml` files.
#
# Usage conda activate py37cmp-gui
# /bin/bash build_docs.sh
#
# Created by Sebastien Tourbier
# Source: https://github.com/connectomicslab/connectomemapper3/blob/master/build_docs.sh
# Get the directory where this script is located
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Linux
DIR="$(dirname $(readlink -f "$0"))"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
DIR="$(dirname "$0")"
fi
echo "Building documentation in $DIR/docs/_build/html"
# Store current working directory
OLDPWD="$PWD"
# Go to the documentation root directory
cd "$DIR/docs"
# Clean an existing build
make clean
# Build the HTML documentation
make html
# Get back to current working directory
cd "$OLDPWD"