-
Notifications
You must be signed in to change notification settings - Fork 3
/
install
executable file
·64 lines (48 loc) · 1.97 KB
/
install
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
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
bold=$(tput bold)
red=$(tput setaf 1)
yel=$(tput setaf 3)
end=$(tput sgr 0)
# Define Hardware platform
platform=`uname -i`
# Checking platforms
if [[ $platform == "x86_64" ]]; then
platform="amd64"
elif [[ $platform == "armv7l" ]]; then
chipset="armv7l"
platform="arm"
fi
echo "$bold $red Installing Dependencies $end"
echo "$bold $yel > Installing Scilab... $end"
sudo apt-get install scilab
echo "$bold $yel > Installing python-dev... $end"
sudo apt-get install python-dev
echo "$bold $yel > Installing python-numpy... $end"
sudo apt-get install python-numpy
#echo "Installing python"
echo "$bold $red Installing sciscipy $end"
./setup.py build
# For Debian/Ubuntu based OSes
sudo ./setup.py install --install-layout=deb --record installed_files.txt
echo "$bold $red Setting up variables $end"
s2pconf=/etc/ld.so.conf.d/sciscipy.conf
# Remove existing sciscipy.conf
sudo rm $s2pconf
sudo bash -c "echo '/usr/lib/scilab' >> $s2pconf"
sudo bash -c "echo '/usr/lib/jvm/default-java/jre/lib/$platform/native_threads' >> $s2pconf"
sudo bash -c "echo '/usr/lib/jvm/default-java/jre/lib/$platform/' >> $s2pconf"
sudo bash -c "echo '/usr/lib/jvm/default-java/jre/lib/$platform/server' >> $s2pconf"
env=/etc/environment
sudo bash -c "echo 'export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' >> $env"
sudo bash -c "echo 'export SCI=/usr/share/scilab' >> $env"
sudo bash -c "echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/scilab:/usr/lib/jvm/java-6-openjdk-$platform/jre/lib/$platform/server/:/usr/lib/jvm/java-6-openjdk/jre/lib/$platform/native_threads/:/usr/local/lib' >> $env"
source $env
# Appending bashrc to source /etc/environment
echo "$bold $red Appending .bashrc to source /etc/environment file... $end"
bashrc=$HOME/.bashrc
echo "source /etc/environment" >> $bashrc
# Testing
echo "$bold $red Testing... $end"
CURRENT_PATH=`pwd`
export PYTHONPATH="$CURRENT_PATH/build/lib.linux-x86_64-2.7/"
./setup.py test