[Rivet-svn] r2724 - bootstrap

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Oct 25 15:44:06 BST 2010


Author: buckley
Date: Mon Oct 25 15:44:06 2010
New Revision: 2724

Log:
Protect against zsh, ksh trying to use the completion script

Modified:
   bootstrap/rivet-bootstrap

Modified: bootstrap/rivet-bootstrap
==============================================================================
--- bootstrap/rivet-bootstrap	Mon Oct 25 15:11:35 2010	(r2723)
+++ bootstrap/rivet-bootstrap	Mon Oct 25 15:44:06 2010	(r2724)
@@ -569,7 +569,7 @@
 
 
     ## Collect and write out environment variables
-    ## TODO: just point at rivetenv.(c)sh from 1.2.2 onwards
+    ## TODO: just point at rivetenv.(c)sh from 1.3.0 (and AGILe 1.2.0) onwards. Need to add completion sourcing?
     env = {}
 
     ## Path env
@@ -609,11 +609,11 @@
         SHENV += "export %s=%s\n" % (k,v)
     comppath = os.path.join(PREFIX, "share", "Rivet", "rivet-completion")
     if os.path.exists(comppath):
-        SHENV += ". %s\n" % comppath
+        SHENV += "test \"$SHELL\" = \"bash\" && source %s\n" % comppath
     if opts.INSTALL_AGILE:
         comppath = os.path.join(PREFIX, "share", "AGILe", "agile-completion")
         if os.path.exists(comppath):
-            SHENV += ". %s\n" % comppath
+            SHENV += "test \"$SHELL\" = \"bash\" && source %s\n" % comppath
     os.chdir(ROOT)
     f = open("rivetenv.sh", "w")
     f.write(SHENV)


More information about the Rivet-svn mailing list