annotate lisp/w3/custom-check @ 36:c53a95d3c46d r19-15b101

Import from CVS: tag r19-15b101
author cvs
date Mon, 13 Aug 2007 08:53:38 +0200
parents
children 8d2a9b52c682 9f59509498e1
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}
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
3 if [ -z "$HOME" ]; then
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
4 HOME=`(cd ; pwd)`
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
5 fi
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
6
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
7 if [ -n "$WIDGETDIR" ]; then
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
8 echo "WIDGETDIR environment variable set, good good"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
9 exit 0
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
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
12 WITH=`${EMACS} -batch -l ${HOME}/.emacs -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname`
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
13 WITHOUT=`${EMACS} -batch -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname`
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
14
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
15 if [ "${WITH}" = "${WITHOUT}" ]; then
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
16 exit 0
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
17 else
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
18 echo "WARNING -- WARNING -- WARNING"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
19 echo "Found custom in different places with and without ${HOME}/.emacs"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
20 echo
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
21 echo "This could cause potential problems. Please recompile with"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
22 echo "the environment variable WIDGETDIR set correctly. Try this"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
23 echo "command:"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
24 echo "make WIDGETDIR=${WITH}"
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
25 exit 1
c53a95d3c46d Import from CVS: tag r19-15b101
cvs
parents:
diff changeset
26 fi