-
Notifications
You must be signed in to change notification settings - Fork 256
/
travis_before_script.sh
executable file
·45 lines (42 loc) · 1.14 KB
/
travis_before_script.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
#!/bin/bash
print_header()
{
TEXT="$1"
printf "#\n"
printf "# %s\n" "$TEXT"
printf "#\n"
}
cd core
if [ "${COVERITY_SCAN}" ]; then
# run configure with default options
debian/rules override_dh_auto_configure
eval "$COVERITY_SCAN_BUILD"
else
print_header "build Bareos core packages"
fakeroot debian/rules binary
fi
if [ "${BUILD_WEBUI}" ]; then
cd ../webui
# to avoid timestamp conflicts while autoconfiguring we refresh every file
touch *
if [ "${COVERITY_SCAN}" ]; then
# run configure with default options
debian/rules override_dh_auto_configure
eval "$COVERITY_SCAN_BUILD"
else
print_header "build Bareos webui packages"
fakeroot debian/rules binary
fi
fi
print_header "create Debian package repository"
cd ..
dpkg-scanpackages . > Packages
gzip --keep Packages
ls -la Packages*
printf 'deb file:%s /\n' $PWD > /tmp/bareos.list
sudo cp /tmp/bareos.list /etc/apt/sources.list.d/bareos.list
cd -
print_header "install Bareos core package"
sudo apt-get -qq update
sudo apt-get install -y --force-yes bareos bareos-database-$DB
if [ "${BUILD_WEBUI}" ]; then sudo apt-get install -y --force-yes bareos-webui; fi