comparison 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
comparison
equal deleted inserted replaced
117:578fd4947a72 118:7d55a9ba150c
1 #!/bin/sh 1 #!/bin/sh
2 EMACS=${1:-emacs} 2 EMACS=${1:-emacs}
3
4 if [ -n "$WIDGETDIR" ]; then
5 exit 0
6 fi
7
3 if [ -z "$HOME" ]; then 8 if [ -z "$HOME" ]; then
4 HOME=`(cd ; pwd)` 9 HOME=`(cd ; pwd)`
5 fi 10 fi
6 11
7 if [ -f "${HOME}/.emacs" ]; then 12 if [ -f "${HOME}/.emacs" ]; then
8 DOTEMACS="-l ${HOME}/.emacs" 13 DOTEMACS="-l ${HOME}/.emacs"
9 fi 14 fi
10 15
11 WITH=` ${EMACS} -batch ${DOTEMACS} -eval '(princ (file-truename (locate-library "custom")))'` 16 WITH=` ${EMACS} -batch ${DOTEMACS} -eval '(princ (file-truename (locate-library "custom")))' 2> /dev/null`
12 WITHOUT=`${EMACS} -batch -q -no-site-file -eval '(princ (file-truename (locate-library "custom")))'` 17 WITHOUT=`${EMACS} -batch -q -no-site-file -eval '(princ (file-truename (locate-library "custom")))' 2>/dev/null`
18
19 # For some reason XEmacs sometimes ends up with a newline at the beginning
20 # of the output... this will hopefully strip it out.
21 WITH=`echo $WITH | tr '\010\013' ' '`
22 WITHOUT=`echo $WITHOUT | tr '\013\010' ' '`
13 23
14 if [ "${WITH}" = "${WITHOUT}" ]; then 24 if [ "${WITH}" = "${WITHOUT}" ]; then
15 exit 0 25 exit 0
16 else 26 else
27 DIRECTORY=`dirname ${WITH}`
28
17 echo "WARNING -- WARNING -- WARNING" 29 echo "WARNING -- WARNING -- WARNING"
18 echo "Found custom in different places with and without ${HOME}/.emacs" 30 echo "Found custom in different places with and without ${HOME}/.emacs"
19 echo 31 echo
20 echo "This could cause potential problems. Please recompile with" 32 echo "This could cause potential problems. Please recompile with"
21 echo "the environment variable WIDGETDIR set correctly. Try this" 33 echo "the environment variable WIDGETDIR set correctly. Try this"
22 echo "command:" 34 echo "command:"
23 echo "make WIDGETDIR=${WITH}" 35 echo "make WIDGETDIR=${DIRECTORY}"
24 exit 1 36 exit 1
25 fi 37 fi