-
Notifications
You must be signed in to change notification settings - Fork 25
/
dist.sh
executable file
·50 lines (45 loc) · 1.29 KB
/
dist.sh
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
45
46
47
48
49
50
#!/bin/sh
#
# ############# README ##############
# This makes an archive file including static copy of submodules (StdFace)
# and PDF formatted documents docs/userguide_HPhi_(ja|en).pdf
# The output filename is HPhi-${vid}.tar.gz,
# where ${vid} is the version number such as 3.5.0 .
# Before using this, install the following python packages:
# sphinx
# sphinx_numfig
# sphinxcontib_spelling
# git-archive-all
# #####################################
git-archive-all --help > /dev/null 2>&1
if [ $? != 0 ]; then
echo 'ERROR: git-archive-all is not available'
echo 'HINT: python3 -m pip install git-archive-all'
exit 1
fi
#
# Version ID
#
major=`cat src/include/version_major.h`
minor=`cat src/include/version_minor.h`
patch=`cat src/include/version_patch.h`
vid=`echo ${major}.${minor}.${patch}`
ROOTDIR=`pwd`
# Build docments
cd $ROOTDIR/doc/ja
make latexpdf
cp ./build/latex/userguide_HPhi_ja.pdf $ROOTDIR/doc
cd $ROOTDIR/doc/en
make latexpdf
cp ./build/latex/userguide_HPhi_en.pdf $ROOTDIR/doc
cd $ROOTDIR/doc/tutorial/en
make latexpdf
cp ./build/latex/tutorial_HPhi_en.pdf $ROOTDIR/doc
# Make a tarball
cd $ROOTDIR
git-archive-all \
--extra=doc/userguide_HPhi_ja.pdf \
--extra=doc/userguide_HPhi_en.pdf \
--extra=doc/tutorial_HPhi_en.pdf \
--prefix=HPhi-${vid} \
HPhi-${vid}.tar.gz