forked from LindseyLab-umich/al_driver-LLfork
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_pydocs.sh
More file actions
executable file
·44 lines (25 loc) · 782 Bytes
/
build_pydocs.sh
File metadata and controls
executable file
·44 lines (25 loc) · 782 Bytes
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
#!/bin/bash
# NOTE: If this command fails, edit utilities/local_pydoc.py to call the same
# python path as you use to execute this driver
# NOTE: local_pydoc.py is simply the code located at:
# https://github.com/python/cpython/blob/2.7/Lib/pydoc.py
cd src
rm -rf pydoc
cp utilities/local_pydoc.py .
for i in `ls *py`; do python2.7 local_pydoc.py -w ${i%*.py}; done
mkdir ../pydoc
mv *html ../pydoc
rm -f local_pydoc.py
browser=`which firefox`
loc=`pwd`
echo "Attempting to open ${loc}/doc/main.html with firefox..."
if [[ $browser == *"no firefox in"* ]] ; then
echo "Cannot find browser firefox. Exiting"
exit 0
elif [ ! $browser ] ; then
echo "Cannot find browser firefox. Exiting"
exit 0
else
echo "Opening documentation"
firefox doc/main.html &
fi