2014-04-11 11:01:38 +02:00
#!/bin/sh
2014-04-11 12:17:04 +02:00
if [ ! -e /.dockerenv ]; then
echo "This script should only be run in the Docker VM environment."
exit 1
fi
cd
2014-04-11 11:42:37 +02:00
2014-04-11 12:30:06 +02:00
cp icinga2/tools/debug/gdb/gdbinit .gdbinit
sed -i 's/home\/gbeutner/home\/icinga/' .gdbinit
2014-04-11 11:42:37 +02:00
cd icinga2-build || exit 1
2014-04-11 11:01:38 +02:00
CCACHE_SLOPPINESS="include_file_mtime"
export CCACHE_SLOPPINESS
2014-04-11 12:17:04 +02:00
if [ ! -e Makefile ]; then
2014-04-11 12:30:06 +02:00
CC="ccache clang" CXX="ccache clang++" cmake ../icinga2 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/icinga2-install -DCMAKE_INSTALL_SYSCONFDIR=$HOME/icinga2-config
2014-04-11 11:01:38 +02:00
fi
2014-04-11 12:30:06 +02:00
make -j 4 && make install && cgdb -ex set scheduler-locking step -ex r --args ../icinga2-install/sbin/icinga2 -c ../icinga2-config/icinga2/icinga2.conf -DUseVfork=0