36
|
1 #!/bin/sh
|
|
2 EMACS=${1:-emacs}
|
|
3 if [ -z "$HOME" ]; then
|
|
4 HOME=`(cd ; pwd)`
|
|
5 fi
|
|
6
|
|
7 if [ -n "$WIDGETDIR" ]; then
|
|
8 echo "WIDGETDIR environment variable set, good good"
|
|
9 exit 0
|
|
10 fi
|
|
11
|
|
12 WITH=`${EMACS} -batch -l ${HOME}/.emacs -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname`
|
|
13 WITHOUT=`${EMACS} -batch -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname`
|
|
14
|
|
15 if [ "${WITH}" = "${WITHOUT}" ]; then
|
|
16 exit 0
|
|
17 else
|
|
18 echo "WARNING -- WARNING -- WARNING"
|
|
19 echo "Found custom in different places with and without ${HOME}/.emacs"
|
|
20 echo
|
|
21 echo "This could cause potential problems. Please recompile with"
|
|
22 echo "the environment variable WIDGETDIR set correctly. Try this"
|
|
23 echo "command:"
|
|
24 echo "make WIDGETDIR=${WITH}"
|
|
25 exit 1
|
|
26 fi
|