annotate lisp/w3/custom-check @ 142:1856695b1fa9 r20-2b5

Import from CVS: tag r20-2b5
author cvs
date Mon, 13 Aug 2007 09:33:18 +0200
parents 7d55a9ba150c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
1 #!/bin/sh
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
2 EMACS=${1:-emacs}
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
3
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
4 if [ -n "$WIDGETDIR" ]; then
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
5 exit 0
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
6 fi
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
7
36
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
8 if [ -z "$HOME" ]; then
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
9 HOME=`(cd ; pwd)`
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
10 fi
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
11
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 36
diff changeset
12 if [ -f "${HOME}/.emacs" ]; then
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 36
diff changeset
13 DOTEMACS="-l ${HOME}/.emacs"
36
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
14 fi
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
15
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
16 WITH=` ${EMACS} -batch ${DOTEMACS} -eval '(princ (file-truename (locate-library "custom")))' 2> /dev/null`
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
17 WITHOUT=`${EMACS} -batch -q -no-site-file -eval '(princ (file-truename (locate-library "custom")))' 2>/dev/null`
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
18
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
19 # For some reason XEmacs sometimes ends up with a newline at the beginning
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
20 # of the output... this will hopefully strip it out.
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
21 WITH=`echo $WITH | tr '\010\013' ' '`
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
22 WITHOUT=`echo $WITHOUT | tr '\013\010' ' '`
36
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
23
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
24 if [ "${WITH}" = "${WITHOUT}" ]; then
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
25 exit 0
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
26 else
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
27 DIRECTORY=`dirname ${WITH}`
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
28
36
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
29 echo "WARNING -- WARNING -- WARNING"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
30 echo "Found custom in different places with and without ${HOME}/.emacs"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
31 echo
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
32 echo "This could cause potential problems. Please recompile with"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
33 echo "the environment variable WIDGETDIR set correctly. Try this"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
34 echo "command:"
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 116
diff changeset
35 echo "make WIDGETDIR=${DIRECTORY}"
36
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
36 exit 1
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
37 fi