view lisp/w3/custom-check @ 62:28a7c63c7e1e r19-16-pre6

Import from CVS: tag r19-16-pre6
author cvs
date Mon, 13 Aug 2007 08:59:13 +0200
parents 6a22abad6937
children
line wrap: on
line source

#!/bin/sh
EMACS=${1:-emacs}
if [ -z "$HOME" ]; then
    HOME=`(cd ; pwd)`
fi

if [ -f "${HOME}/.emacs" ]; then
    DOTEMACS="-l ${HOME}/.emacs"
fi

WITH=`   ${EMACS} -batch ${DOTEMACS}      -eval '(princ (file-truename (locate-library "custom")))'`
WITHOUT=`${EMACS} -batch -q -no-site-file -eval '(princ (file-truename (locate-library "custom")))'`

if [ "${WITH}" = "${WITHOUT}" ]; then
    exit 0
else
    echo "WARNING -- WARNING -- WARNING"
    echo "Found custom in different places with and without ${HOME}/.emacs"
    echo
    echo "This could cause potential problems.  Please recompile with"
    echo "the environment variable WIDGETDIR set correctly.  Try this"
    echo "command:"
    echo "make WIDGETDIR=${WITH}"
    exit 1
fi