libiso8601/scripts/paths

65 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2007-09-13 11:25:31 +01:00
# libiso8601/scripts/paths
2007-12-05 17:45:23 +00:00
#
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
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"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4