#!/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..." ; cd "${bs_dir}" && autoreconf -fi || exit 1 echo 'Configuring...' cd "${bs_dir}"/ && ./configure --prefix=/opt/zentific -sysconfdir=/etc --enable-debug $@ || 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