-
Notifications
You must be signed in to change notification settings - Fork 3
/
make_archive.sh
43 lines (36 loc) · 842 Bytes
/
make_archive.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
if [ $# -ne 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi
version=$1
ROOT_DIR=`pwd`
if [ -z "$(grep 'project(DSQSS' $ROOT_DIR/CMakeLists.txt 2>/dev/null)" ]; then
echo "ERROR: current directory is not the root directory of the DSQSS codes"
exit 1
fi
if [ ! -d $ROOT_DIR/.git ]; then
echo "ERROR: this is not a git repository"
exit 1
fi
res=0
type git-archive-all >/dev/null 2>&1 || res=1
if [ $res -eq 1 ]; then
echo "ERROR: git-archive-all is not installed"
exit 1
fi
cd $ROOT_DIR
rm -rf build-doc
mkdir build-doc
cd build-doc
cmake -DDocument=ON ../
for lang in jp en; do
make doc-${lang}-pdf
cp doc/${lang}/pdf/DSQSS.pdf ../DSQSS_${lang}.pdf
done
cd $ROOT_DIR
git submodule update -i -r
git-archive-all \
--prefix=DSQSS-${version} \
--extra=DSQSS_jp.pdf \
--extra=DSQSS_en.pdf \
DSQSS-${version}.tar.gz