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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
#!/bin/bash
RED="\\033[1;31m"
GREEN="\\033[1;32m"
NORMAL="\\033[0;39m"
mkdir -p packages/sources
function make_distcheck()
{
dir=$1
/bin/echo -e "**************************************"
/bin/echo -e "Build sources for $dir"
/bin/echo -e "**************************************"
cd $dir
if [ -f ./autogen.sh ]; then
./autogen.sh 1>/dev/null
fi
make distcheck 1>/dev/null && /bin/echo -e " * ${GREEN}SUCCESS${NORMAL}" || `/bin/echo -e " * ${RED}FAILURE${NORMAL}" && exit 1`
cd ..
/bin/echo -e
}
function opensand()
{
for dir in opensand-output opensand-conf opensand-rt opensand-collector opensand-core opensand-daemon opensand-manager; do
if [ -f $dir/autogen.sh ]; then
make_distcheck $dir
elif [ -f $dir/setup.py ]; then
cd $dir
/bin/echo -e "**************************************"
/bin/echo -e "Build sources for $dir"
/bin/echo -e "**************************************"
python setup.py sdist --formats=gztar 1>/dev/null && /bin/echo -e " * ${GREEN}SUCCESS${NORMAL}" || `/bin/echo -e " * ${RED}FAILURE${NORMAL}" && exit 1`
cd ..
/bin/echo -e
fi
done
}
function encap()
{
cd opensand-plugins/encapsulation
for dir in gse; do
make_distcheck $dir
done
cd ../..
}
function lan()
{
cd opensand-plugins/lan_adaptation
for dir in rohc; do
make_distcheck $dir
done
cd ../..
}
function att()
{
cd opensand-plugins/physical_layer/attenuation_model
for dir in ideal on_off triangular; do
make_distcheck $dir
done
cd ../../..
}
function nom()
{
cd opensand-plugins/physical_layer/nominal_condition/
for dir in default; do
make_distcheck $dir
done
cd ../../..
}
function min()
{
cd opensand-plugins/physical_layer/minimal_condition/
for dir in modcod constant; do
make_distcheck $dir
done
cd ../../..
}
function err()
{
cd opensand-plugins/physical_layer/error_insertion
for dir in gate; do
make_distcheck $dir
done
cd ../../..
}
function phy()
{
return
# att
# nom
# min
# err
}
move()
{
mv `find . -name \*.tar.gz` packages/sources
}
case $1 in
"all"|"")
opensand
encap
lan
phy
move
;;
"opensand")
opensand
;;
"encap")
encap
;;
"lan")
lan
;;
"phy")
phy
;;
"clean")
rm -rf packages/sources
;;
*)
/bin/echo -e "wrong command (all, opensand, encap, lan, phy)"
;;
esac
|