activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1089431 - in /activemq/activemq-apollo/trunk/apollo-cli/src/main: resources/org/apache/activemq/apollo/cli/commands/bin/ scala/org/apache/activemq/apollo/cli/commands/
Date Wed, 06 Apr 2011 12:47:20 GMT
Author: dejanb
Date: Wed Apr  6 12:47:20 2011
New Revision: 1089431

URL: http://svn.apache.org/viewvc?rev=1089431&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3267 - Make it able run Apollo without setting env
variables

Modified:
    activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker
    activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker.cmd
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker?rev=1089431&r1=1089430&r2=1089431&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker
Wed Apr  6 12:47:20 2011
@@ -46,6 +46,9 @@ if [ -z "$APOLLO_BASE" ] ; then
     
 fi
 
+if [ -z "$APOLLO_HOME" ] ; then
+  APOLLO_HOME=${home}
+fi
 
-exec apollo $@
+exec $APOLLO_HOME/bin/apollo $@
 

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker.cmd
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker.cmd?rev=1089431&r1=1089430&r2=1089431&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker.cmd
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker.cmd
Wed Apr  6 12:47:20 2011
@@ -18,9 +18,11 @@
 
 setlocal
 
+if "%APOLLO_HOME%"=="" set APOLLO_HOME=${home}
+
 if "%APOLLO_BASE%"=="" set APOLLO_BASE=%~dp0..
 
-apollo %*
+%APOLLO_HOME%\bin\apollo %*
 
 :END
 endlocal

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala?rev=1089431&r1=1089430&r2=1089431&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
Wed Apr  6 12:47:20 2011
@@ -102,10 +102,10 @@ class Create extends Action {
 
       if( IS_WINDOWS ) {
         target = bin / "apollo-broker.cmd"
-        write("bin/apollo-broker.cmd", target)
+        write("bin/apollo-broker.cmd", target, true)
       } else {
         target = bin / "apollo-broker"
-        write("bin/apollo-broker", target)
+        write("bin/apollo-broker", target, true)
         setExecutable(target)
       }
 
@@ -162,6 +162,7 @@ class Create extends Action {
       if( filter ) {
         content = content.replaceAll(Pattern.quote("${host}"), Matcher.quoteReplacement(host))
         content = content.replaceAll(Pattern.quote("${version}"), Matcher.quoteReplacement(Broker.version))
+        content = content.replaceAll(Pattern.quote("${home}"), Matcher.quoteReplacement(System.getProperty("apollo.home")))
       }
 
       // and then writing out in the new target encoding.



Mime
View raw message