lw-build-system/skel/scripts/paths

64 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2007-09-11 23:06:23 +01:00
# @P@/scripts/paths
2007-10-14 11:31:40 +01:00
#
# Copyright: ©@YEAR@, @COPYRIGHT@
# Author: @AUTHOR@, <@EMAIL@>
# License: GPLv3
2007-09-11 23:06:23 +01:00
#
# Default path setup. Not meant for editing; use environment variables
# to override values if needed.
#
MY_PREFIX="${PREFIX}"
[ "${MY_PREFIX}" == "/" ] && MY_PREFIX=""
2007-09-11 23:06:23 +01:00
[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin"
[ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin"
[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib"
2007-09-11 23:06:23 +01:00
if [ -z "${INCLUDEDIR}" ]
then
case "${PREFIX}" in
/) INCLUDEDIR="/usr/include" ;;
*) INCLUDEDIR="${PREFIX}/include" ;;
esac
fi
2007-09-11 23:06:23 +01:00
if [ -z "${CONFIGDIR}" ]
then
case "${PREFIX}" in
/ | /usr) CONFIGDIR="/etc" ;;
/opt*) CONFIGDIR="/etc${PREFIX}" ;;
*) CONFIGDIR="${PREFIX}/etc" ;;
esac
fi
2007-09-17 10:51:49 +01:00
if [ -z "${VARDIR}" ]
then
case "${PREFIX}" in
/ | /usr | /usr/local) VARDIR="/var" ;;
/opt*) VARDIR="/var${PREFIX}" ;;
*) VARDIR="${PREFIX}/var" ;;
esac
fi
2007-09-11 23:06:23 +01: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-11-24 14:27:48 +00:00
[ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin"
2007-10-14 11:31:40 +01:00
# vim: syntax=sh:@VIM_MODELINE@