#!/bin/bash bs_dir="$(dirname $(readlink -f $0))" rm -rf "${bs_dir}"/autom4te.cache rm -f "${bs_dir}"/aclocal.m4 "${bs_dir}"/ltmain.sh echo 'Running autoreconf -if...' autoreconf -if || exit 1 echo 'Configuring...' cd "${bs_dir}" && CFLAGS="-Wall -Wextra -pipe" ./configure --prefix=/opt/zentific --sysconfdir=/etc --enable-debug $@ && cd - &> /dev/null || exit 1 echo -e "\nRunning make..." make -C "${bs_dir}" -j2 --no-print-directory V=0 || exit 1 echo -e "\n\nDone!" echo -e "\nYou must now run 'make install' as a privileged user." [[ ! -d /var/run/zentific ]] && echo -e "\nRequired directory missing! Execute the following command or zensched will not run!\n\tmkdir /var/run/zentific" [[ ! -d /opt/zentific/logs ]] && mkdir -p /opt/zentific/logs