Mercurial > hg > xemacs-beta
diff lisp/w3/custom-check @ 114:8619ce7e4c50 r20-1b9
Import from CVS: tag r20-1b9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:21:54 +0200 |
parents | c53a95d3c46d |
children | 8d2a9b52c682 9f59509498e1 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/w3/custom-check Mon Aug 13 09:21:54 2007 +0200 @@ -0,0 +1,26 @@ +#!/bin/sh +EMACS=${1:-emacs} +if [ -z "$HOME" ]; then + HOME=`(cd ; pwd)` +fi + +if [ -n "$WIDGETDIR" ]; then + echo "WIDGETDIR environment variable set, good good" + exit 0 +fi + +WITH=`${EMACS} -batch -l ${HOME}/.emacs -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname` +WITHOUT=`${EMACS} -batch -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname` + +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