0

I am trying to run create targets via gogo shell client api. I have written a script which starts the client.jar from apache ace distribution. Then I am trying to run the gogo shell client api commands in the same script.

The script code is:

#!/bin/bash

This cmd starts the gogo shell:

java -Dagent.discovery.serverurls="http://localhost:8080"     -Dorg.apache.ace.r="localhost:8080"     -Dorg.apache.ace.obr="localhost:8080"     -Dorg.osgi.service.http.port=-1     -Dorg.apache.ace.configurator.CONFIG_DIR="/path/apache-ace-2.0.1-bin/client/conf"     -Dace.gogo.script.delay="3000"     -jar /path/apache-ace-2.0.1-bin/client/client.jar  & MyPID=$!                        
echo $MyPID

This creates a workspace in the gogo shell:

w = (cw)

$w cf property-feature

$w lf

But when i run the script i get an error saying

./script.sh: line 6: syntax error near unexpected token (' ./script.sh: line 6: `w = (cw)'

Note: I am trying to manually run the script by running ./script.sh in the terminal. Any ideas on this would be really helpful.

Sampada
  • 2,931
  • 7
  • 27
  • 39
Shridhar
  • 11
  • 5
  • Sounds like you're trying to run a script written in the gogo shell language in a terminal (sh or bash). That won't work. – Marcel Offermans Oct 30 '15 at 07:34
  • Thanks for the response, Is there a way in which i can run a script through maven which will deploy the OSGI bundles to Apache ACE? – Shridhar Nov 02 '15 at 06:51
  • You can run the script in an ACE client. Make sure you have the server running and then launch the client like this: java -Dace.gogo.script=script.sh -jar client.jar ...that should run a new client, run the script. If the script ends by stopping the client again, you can run it in a build script such as Maven / Ant / Gradle. – Marcel Offermans Nov 02 '15 at 21:10

0 Answers0