64 lines
1.4 KiB
Bash
64 lines
1.4 KiB
Bash
# daemonitor/scripts/paths
|
||
#
|
||
# Copyright: ©2007–2012, Güralp Systems Limited
|
||
# Author: Laurence Withers, <lwithers@guralp.com>
|
||
# License: GPLv3
|
||
#
|
||
# Default path setup. Not meant for editing; use environment variables
|
||
# to override values if needed.
|
||
#
|
||
|
||
MY_PREFIX="${PREFIX}"
|
||
[ "${MY_PREFIX}" == "/" ] && MY_PREFIX=""
|
||
|
||
[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin"
|
||
[ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin"
|
||
[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib"
|
||
|
||
if [ -z "${INCLUDEDIR}" ]
|
||
then
|
||
case "${PREFIX}" in
|
||
/) INCLUDEDIR="/usr/include" ;;
|
||
*) INCLUDEDIR="${PREFIX}/include" ;;
|
||
esac
|
||
fi
|
||
|
||
if [ -z "${CONFIGDIR}" ]
|
||
then
|
||
case "${PREFIX}" in
|
||
/ | /usr) CONFIGDIR="/etc" ;;
|
||
/opt*) CONFIGDIR="/etc${PREFIX}" ;;
|
||
*) CONFIGDIR="${PREFIX}/etc" ;;
|
||
esac
|
||
fi
|
||
|
||
if [ -z "${VARDIR}" ]
|
||
then
|
||
case "${PREFIX}" in
|
||
/ | /usr | /usr/local) VARDIR="/var" ;;
|
||
/opt*) VARDIR="/var${PREFIX}" ;;
|
||
*) VARDIR="${PREFIX}/var" ;;
|
||
esac
|
||
fi
|
||
|
||
if [ -z "${SHAREDIR}" ]
|
||
then
|
||
case "${PREFIX}" in
|
||
/) SHAREDIR="/usr/share" ;;
|
||
*) SHAREDIR="${PREFIX}/share" ;;
|
||
esac
|
||
fi
|
||
[ -z "${DOCSDIR}" ] && DOCSDIR="${SHAREDIR}/doc"
|
||
|
||
if [ -z "${SRVDIR}" ]
|
||
then
|
||
case "${PREFIX}" in
|
||
/ | /usr | /usr/local) SRVDIR="/srv" ;;
|
||
*) SRVDIR="${PREFIX}/srv" ;;
|
||
esac
|
||
fi
|
||
[ -z "${WEBDIR}" ] && WEBDIR="${SRVDIR}/http"
|
||
[ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin"
|
||
|
||
# vim: syntax=sh:expandtab:ts=4:sw=4
|