diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/w3/custom-check	Mon Aug 13 08:53:38 2007 +0200
@@ -0,0 +1,26 @@
+#!/bin/sh
+EMACS=${1:-emacs}
+if [ -z "$HOME" ]; then
+    HOME=`(cd ; pwd)`
+fi
+
+if [ -n "$WIDGETDIR" ]; then
+    echo "WIDGETDIR environment variable set, good good" 
+    exit 0
+fi
+
+WITH=`${EMACS} -batch -l ${HOME}/.emacs -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname`
+WITHOUT=`${EMACS} -batch -eval '(princ (locate-library "custom"))' | cut -f3- |xargs dirname`
+
+if [ "${WITH}" = "${WITHOUT}" ]; then
+    exit 0
+else
+    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=${WITH}"
+    exit 1
+fi