Commit 62c72d81 authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix files location

parent 0cdfa069
......@@ -3,14 +3,24 @@
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
ETERBUILDETC=/etc/eterbuild
ETERBUILDDIR=/usr/share/eterbuild
# if run from local installation
if ! dirname $0 | grep /usr/share >/dev/null ; then
set_eterbuilddir()
{
# if run from no system installation
if dirname $0 | grep $ETERBUILDDIR >/dev/null ; then
ETERBUILDETC=/etc/eterbuild
ETERBUILDDIR=/usr/share/eterbuild
else
ETERBUILDDIR=$(realpath `dirname $0`/../share/eterbuild)
ETERBUILDETC=$(realpath `dirname $0`/../etc)
echo "Note: run from source tree, datadir=$ETERBUILDDIR, sysconfdir=$ETERBUILDETC"
fi
}
# set if empty and check it
[ -n "$ETERBUILDDIR" ] || set_eterbuilddir
if [ -z "$ETERBUILDIR" ] ; then
echo "Can't detect package files location"
exit 1
fi
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment