forked from skelcl/skelcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallDependenciesCentOS.sh
executable file
·57 lines (51 loc) · 2.04 KB
/
installDependenciesCentOS.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
52
53
54
55
56
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Install modern developer toolset (devtools-1.1)? (requires root access)"
echo "(y)es (n)o"
read ANSWER
if [[ "$ANSWER" == 'y' ]]; then
set -x #echo on
su -c 'wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -O /etc/yum.repos.d/devtools-1.1.repo && yum install devtoolset-1.1'
echo "To enable the developer toolset permernently add 'scl enable devtoolset-1.1 bash' to your ~/.bashrc"
set +x #echo off
fi
echo "Add Extra Packages for Enterprise Linux (EPEL) repository? (requires root access)"
echo "(y)es (n)o"
read ANSWER
if [[ "$ANSWER" == 'y' ]]; then
set -x #echo on
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
su -c 'rpm -ivh epel-release-6-8.noarch.rpm'
rm epel-release-6-8.noarch.rpm
set +x #echo off
fi
echo "Install SkelCL dependencies? (requires sudo access)"
echo "(y)es or (n)o "
read ANSWER
if [[ "$ANSWER" == 'y' ]]; then
set -x #echo on
su -c 'yum install cmake28 openssl-devel mesa-libGL-devel'
set +x #echo off
if [ -d "$DIR/libraries/stooling/libraries/llvm" ]; then
echo "Skip intallation of llvm, because the 'libraries/stooling/libraries/llvm' directory already exists."
else
set -x #echo on
su -c 'yum install llvm-devel llvm-static clang-devel'
mkdir $DIR/libraries/stooling/libraries/llvm
mkdir $DIR/libraries/stooling/libraries/llvm/bin
ln -s `which llvm-config` $DIR/libraries/stooling/libraries/llvm/bin/llvm-config
ln -s `llvm-config --includedir` $DIR/libraries/stooling/libraries/llvm/include
ln -s `llvm-config --libdir` $DIR/libraries/stooling/libraries/llvm/lib
set +x #echo off
fi
if [ -d "$DIR/libraries/gtest" ]; then
echo "Skip intallation of gtest, because the 'libraries/gtest' directory already exists."
else
set -x #echo on
wget -O gtest-1.7.0.zip https://github.com/google/googletest/archive/release-1.7.0.zip
unzip -q gtest-1.7.0.zip
mv gtest-1.7.0 $DIR/libraries/gtest
rm gtest-1.7.0.zip
set +x #echo off
fi
fi