Browse Source

Fix gemini

Hamilton Turner 11 years ago
parent
commit
0f645f0aac
2 changed files with 5 additions and 4 deletions
  1. 2 0
      gemini/bash_profile.sh
  2. 3 4
      gemini/setup.py

+ 2 - 0
gemini/bash_profile.sh

@@ -0,0 +1,2 @@
+export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
+export RESIN_HOME=${IROOT}/resin-4.0.36

+ 3 - 4
gemini/setup.py

@@ -4,17 +4,16 @@ import sys
 import setup_util
 import setup_util
 from os.path import expanduser
 from os.path import expanduser
 
 
-home = expanduser("~")
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
+  
   setup_util.replace_text("gemini/Docroot/WEB-INF/GeminiHello.conf", "db.ConnectString = .*:3306", "db.ConnectString = " + args.database_host + ":3306")
   setup_util.replace_text("gemini/Docroot/WEB-INF/GeminiHello.conf", "db.ConnectString = .*:3306", "db.ConnectString = " + args.database_host + ":3306")
-  setup_util.replace_text("gemini/Docroot/WEB-INF/resin.xml", "root-directory=\".*\/FrameworkBenchmarks", "root-directory=\"" + home + "/FrameworkBenchmarks")
+  setup_util.replace_text("gemini/Docroot/WEB-INF/resin.xml", "root-directory=\".*\/FrameworkBenchmarks", "root-directory=\"%s" % args.fwroot)
   
   
   try:
   try:
     # This was reporting an error because it already exists... not sure.
     # This was reporting an error because it already exists... not sure.
     #subprocess.call("mkdir classes", shell=True, cwd="gemini/Docroot/WEB-INF", stderr=errfile, stdout=logfile)
     #subprocess.call("mkdir classes", shell=True, cwd="gemini/Docroot/WEB-INF", stderr=errfile, stdout=logfile)
     subprocess.check_call("ant compile", shell=True, cwd="gemini", stderr=errfile, stdout=logfile)
     subprocess.check_call("ant compile", shell=True, cwd="gemini", stderr=errfile, stdout=logfile)
-    subprocess.check_call("$RESIN_HOME/bin/resinctl -conf $HOME/FrameworkBenchmarks/gemini/Docroot/WEB-INF/resin.xml start", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.check_call("$RESIN_HOME/bin/resinctl -conf $FWROOT/gemini/Docroot/WEB-INF/resin.xml start", shell=True, stderr=errfile, stdout=logfile)
     return 0
     return 0
   except subprocess.CalledProcessError:
   except subprocess.CalledProcessError:
     return 1
     return 1