2007-09-13 11:25:31 +01:00
|
|
|
# libiso8601/scripts/paths
|
2007-12-05 17:45:23 +00:00
|
|
|
#
|
2011-11-15 16:46:53 +00:00
|
|
|
# Copyright: ©2011, Güralp Systems Ltd.
|
|
|
|
# Author: Laurence Withers, <lwithers@guralp.com>
|
|
|
|
# License: GPLv3
|
2007-09-13 11:25:31 +01:00
|
|
|
#
|
|
|
|
# Default path setup. Not meant for editing; use environment variables
|
|
|
|
# to override values if needed.
|
|
|
|
#
|
|
|
|
|
2008-12-20 22:36:28 +00:00
|
|
|
MY_PREFIX="${PREFIX}"
|
|
|
|
[ "${MY_PREFIX}" == "/" ] && MY_PREFIX=""
|
2007-09-13 11:25:31 +01:00
|
|
|
|
2008-12-20 22:36:28 +00:00
|
|
|
[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin"
|
|
|
|
[ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin"
|
|
|
|
[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib"
|
2007-09-13 11:25:31 +01:00
|
|
|
|
2008-12-20 22:36:28 +00:00
|
|
|
if [ -z "${INCLUDEDIR}" ]
|
|
|
|
then
|
|
|
|
case "${PREFIX}" in
|
|
|
|
/) INCLUDEDIR="/usr/include" ;;
|
|
|
|
*) INCLUDEDIR="${PREFIX}/include" ;;
|
|
|
|
esac
|
|
|
|
fi
|
2007-09-13 11:25:31 +01:00
|
|
|
|
2008-12-20 22:36:28 +00:00
|
|
|
if [ -z "${CONFIGDIR}" ]
|
|
|
|
then
|
|
|
|
case "${PREFIX}" in
|
|
|
|
/ | /usr) CONFIGDIR="/etc" ;;
|
|
|
|
/opt*) CONFIGDIR="/etc${PREFIX}" ;;
|
|
|
|
*) CONFIGDIR="${PREFIX}/etc" ;;
|
|
|
|
esac
|
|
|
|
fi
|
2007-12-05 17:45:23 +00:00
|
|
|
|
2008-12-20 22:36:28 +00:00
|
|
|
if [ -z "${VARDIR}" ]
|
|
|
|
then
|
|
|
|
case "${PREFIX}" in
|
|
|
|
/ | /usr | /usr/local) VARDIR="/var" ;;
|
|
|
|
/opt*) VARDIR="/var${PREFIX}" ;;
|
|
|
|
*) VARDIR="${PREFIX}/var" ;;
|
|
|
|
esac
|
|
|
|
fi
|
2007-09-13 11:25:31 +01:00
|
|
|
|
2008-12-20 22:36:28 +00:00
|
|
|
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"
|
2007-12-05 17:45:23 +00:00
|
|
|
[ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin"
|
|
|
|
|
|
|
|
# vim: syntax=sh:expandtab:ts=4:sw=4
|