forked from iiasa/message_ix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·52 lines (42 loc) · 976 Bytes
/
install.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
51
#!/bin/bash
inst_args=$@
function error_msg() {
echo =====================================================
echo There was an error during the install process!
echo =====================================================
read -p "Press any key to continue..."
exit 1
}
# update ixmp submodule
git submodule sync
git submodule update --init
if [ "$?" -ne "0" ]; then
error_msg
fi
# install ixmp
cd ./ixmp
python setup.py install $inst_args
if [ "$?" -ne "0" ]; then
error_msg
fi
py.test tests
# install message_ix
cd ../
python setup.py install $inst_args
if [ "$?" -ne "0" ]; then
error_msg
fi
py.test tests
# copy some gams files so users dont commit them
cp ./model/templates/MESSAGE_master_template.gms ./model/MESSAGE_master.gms
cp ./model/templates/MESSAGE_project_template.gpr ./model/MESSAGE_project.gpr
# make the documentation
cd ./doc
make html
cd ../
echo
echo Installation complete
echo
read -p "Press any key to continue..."
echo
exit 0