-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdceinstall.sh
95 lines (80 loc) · 3.2 KB
/
dceinstall.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# dceinstall.sh - Automated installation of dce 1.7 (ns3/linux)
# Copyright (C) 2015 Wireless Information Networking Group (WiNG), NITK Surathkal, Mangalore, India.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# /************************************************************************/
# /* */
# /* */
# /* Designed and Developed by : */
# /* Vijayendra Reddy Gillella, Nishad Samant and Mohit P Tahiliani */
# /* Wireless Information Networking Group (WiNG) */
# /* National Ins&&tute of Technology Karnataka, Surathkal */
# /* Mangalore, Karnataka, INDIA. */
# /* wing@nitk.ac.in , nitkwing@gmail.com */
# /* http://wing.nitk.ac.in */
# /* */
# /************************************************************************/
#
# OS: Ubuntu 14.04, 15.04 and 16.04
#!/bin/bash
set -e
# Run Update
# sudo apt -y update
# Install DCE on Desktop
cd ~/Desktop
if [ ! -d "dce" ]; then
mkdir dce
fi
cd dce
echo "-------------------------------------------------------------------------------------"
echo "Enter 'ns3' for installing dce-ns3-1.9 OR 'linux' for installing dce-linux-1.9"
read var
if [ "$var" != "ns3" ] && [ "$var" != "linux" ]; then
echo "Enter vaild component name to install ns-3-dce (Example ns3 or linux)"
exit
fi
sudo apt -y install mercurial
if [ ! -d "bake" ]; then
hg clone http://code.nsnam.org/bake bake
fi
export BAKE_HOME=`pwd`/bake
export PATH=$PATH:$BAKE_HOME
export PYTHONPATH=$PYTHONPATH:$BAKE_HOME
#Installing necessary components as per 'bake.py check' command
sudo apt -y install cmake cvs git
sudo apt -y install bzr unrar
sudo apt -y install p7zip-full autoconf
type="dce-"$var"-1.9"
# Check whether there exists a previously installed copy
if [ -d "$type" ]; then
echo "-------------------------------------------------------------------------------------"
echo "It seems there already exists a $type directory!"
echo "Rename the existing $type directory on your machine and run this script again"
echo "-------------------------------------------------------------------------------------"
exit
fi
mkdir $type
cd $type
#Installing components required for dce
sudo apt -y install build-essential bison
sudo apt -y install flex g++
sudo apt -y install libc6 libc6-amd64
sudo apt -y install libdb-dev libexpat1-dev
sudo apt -y install libpcap-dev libssl-dev
sudo apt -y install python-dev python-pygraphviz
sudo apt -y install python-pygoocanvas python-setuptools
sudo apt -y install qt4-dev-tools
bake.py configure -e $type
bake.py download
bake.py build -vvv