forked from issp-center-dev/mVMC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dist.sh
executable file
·42 lines (42 loc) · 893 Bytes
/
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
#!/bin/sh
#
# ############# Note ################################
# Before packing, you should clean the GIT directory as
# $ git clean -f -d -x
# #####################################################
#
# Version ID
#
major=`awk '$2=="VERSION_MAJOR"{print $3}' src/mVMC/include/version.h`
minor=`awk '$2=="VERSION_MINOR"{print $3}' src/mVMC/include/version.h`
patch=`awk '$2=="VERSION_PATCH"{print $3}' src/mVMC/include/version.h`
vid=`echo ${major}.${minor}.${patch}`
#
mkdir mVMC-${vid}
#
cp -rf * mVMC-${vid}
#
# Build docments
#
cd mVMC-${vid}/doc/jp
make -f makefile_doc_jp
sed -i -e "s/mathjax/pngmath/g" conf.py
make latexpdfja
make html
cd ../en
sed -i -e "s/mathjax/pngmath/g" conf.py
make latexpdfja
make html
cd ../../
#
# Remove some files
#
find ./ -name ".git*" -delete
rm dist.sh
rm -rf mVMC-${vid}
#
# Pack
#
cd ../
tar czvf mVMC-${vid}.tar.gz mVMC-${vid}
rm -rf mVMC-${vid}