Mercurial > hg > xemacs-beta
view lisp/w3/custom-check @ 118:7d55a9ba150c r20-1b11
Import from CVS: tag r20-1b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:24:17 +0200 |
parents | 9f59509498e1 |
children |
line wrap: on
line source
#!/bin/sh EMACS=${1:-emacs} if [ -n "$WIDGETDIR" ]; then exit 0 fi 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")))' 2> /dev/null` WITHOUT=`${EMACS} -batch -q -no-site-file -eval '(princ (file-truename (locate-library "custom")))' 2>/dev/null` # For some reason XEmacs sometimes ends up with a newline at the beginning # of the output... this will hopefully strip it out. WITH=`echo $WITH | tr '\010\013' ' '` WITHOUT=`echo $WITHOUT | tr '\013\010' ' '` if [ "${WITH}" = "${WITHOUT}" ]; then exit 0 else DIRECTORY=`dirname ${WITH}` 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=${DIRECTORY}" exit 1 fi