-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
35 lines (30 loc) · 817 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
#!/bin/bash
# exit when any command fails
set -e
# keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
# Create extern lib folder
mkdir -p extern
cd extern
# Install gsl 2.5 as an extern lib
wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.5.tar.gz
tar -zxvf gsl-2.5.tar.gz
cd gsl-2.5
mkdir -p ../gsl
./configure --prefix=$PWD/../gsl
make
make install
cd ..
rm -rf gsl-2.5.tar.gz gsl-2.5
# Install libQGLViewer 2.7.1 as an extern lib
wget http://www.libqglviewer.com/src/libQGLViewer-2.7.1.tar.gz
tar -xzf libQGLViewer-2.7.1.tar.gz
cd libQGLViewer-2.7.1/QGLViewer
qmake
make
cd ../..
rm -rf libQGLViewer-2.7.1.tar.gz
echo "Installation done !"
exit 1