libutf8/scripts/paths

65 lines
1.5 KiB
Plaintext
Raw Normal View History

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