gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r123365 - /gump/trunk /gump/trunk/gump
Date Sun, 26 Dec 2004 18:08:34 GMT
Author: leosimons
Date: Sun Dec 26 10:08:33 2004
New Revision: 123365

URL: http://svn.apache.org/viewcvs?view=rev&rev=123365
Log:
More user-friendlyness: check for python library avail (and add some more svn ignores)
Modified:
   gump/trunk/   (props changed)
   gump/trunk/gump

Modified: gump/trunk/gump
Url: http://svn.apache.org/viewcvs/gump/trunk/gump?view=diff&rev=123365&p1=gump/trunk/gump&r1=123364&p2=gump/trunk/gump&r2=123365
==============================================================================
--- gump/trunk/gump	(original)
+++ gump/trunk/gump	Sun Dec 26 10:08:33 2004
@@ -187,11 +187,38 @@
 $2.
 You can either set this before invoking gump, or set it in a file
 named
-  `pwd`/cron/local-env-$envfile.sh
+  $envfile.sh
 "
   fi
 }
 
+# Print a friendly error message i a python library is not available.
+#
+# Arguments:
+#   - the library to import
+#   - url to download location of the library
+function check_env_pylib
+{
+  cat > pycmd.tmp.py <<ENDCOMMAND
+try:
+  import $1
+except:
+  print "error"
+ENDCOMMAND
+  local cmd=`python pycmd.tmp.py`
+  result=`$cmd`
+  rm -f pycmd.tmp.py
+
+  if [[ ! -z "$result" ]]; then
+    error "Required python library $1 is not available.
+Please download it from
+
+  $2
+
+and install it."
+  fi
+}
+
 # Figure out which action to execute.
 function delegate
 {
@@ -254,6 +281,11 @@
 {
   check_env "python" "http://www.python.org/"
   check_env "pkill" "http://sourceforge.net/projects/proctools"
+
+  check_env_var "GUMP_HOME" "the location of the gump checkout"
+  check_env_var "JAVA_HOME" "the location of the java jdk"
+  
+  check_env_pylib "rdflib" "http://rdflib.net/"
 
   cd cron
   ./gump.sh $@

Mime
View raw message