lw-build-system/skel/scripts/paths

65 lines
1.4 KiB
Plaintext
Raw Normal View History

2007-09-11 23:06:23 +01:00
# @P@/scripts/paths
2007-10-14 11:31:40 +01:00
#
# (c)2007, @AUTHOR@, <@EMAIL@>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
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
# kate: @KATE_MODELINE@
# vim: syntax=sh:@VIM_MODELINE@