-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·52 lines (42 loc) · 999 Bytes
/
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
#!/bin/bash
THIS=$( cd "$( dirname "$0" )" && pwd )
usage()
{
echo "emma-cooja install"
echo "install DESTINATION"
echo " DESTINATION: The location of a Contiki directory (David Kopf branch)"
}
if [ ! -d "$1" ]; then
usage
exit
else
DEST="$1"
fi
# Patch Contiki OS
#patch -p2 --directory=$DEST --input=$THIS/patch/cooja_avrora-serial-socket_patch.diff
# Copy COOJA File
echo -e "Copying COOJA files"
echo -e "==================="
cp -R $THIS/src/* $DEST/
cp $THIS/start.sh $DEST
echo -e ""
# Copy simulations
echo -e "Copying simulation files"
echo -e "==================="
cp -R $THIS/simulations $DEST/
echo -e ""
# Compiling tunslip
echo -e "Tunslip6 compilation"
echo -e "==================="
cd $DEST/tools/
gcc tunslip6.c -o tunslip6
cd $THIS
echo -e ""
# Copy Simulation file
echo -e "Copying simulation files"
echo -e "======================="
pwd $DEST/../simulations
mkdir ../../simulations
cp -r $THIS/simulations/* ../../simulations/
echo -e ""
echo "Done."