[ 
https://issues.apache.org/jira/browse/WHIRR-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972095#action_12972095
 ] 

Andrei Savu commented on WHIRR-156:
-----------------------------------

How about using test and not ls? I haven't tested the updated patch. 

{code}
Index: bin/whirr
===================================================================
--- bin/whirr   (revision 1049657)
+++ bin/whirr   (working copy)
@@ -18,4 +18,14 @@
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 
-java -jar $bin/../whirr-cli-*.jar "$@"
+release_jar=$bin/../whirr-cli-*.jar
+snapshot_jar=$bin/../cli/target/whirr-cli-*-SNAPSHOT.jar
+
+if [ -f $release_jar ]; then
+  java -jar $release_jar "$@"
+elif [ -f $snapshot_jar ]; then
+  java -jar $snapshot_jar "$@"
+else
+  echo "No CLI JAR found."
+  exit 1
+fi
{code}

> Cli script doesn't launch post-modularization
> ---------------------------------------------
>
>                 Key: WHIRR-156
>                 URL: https://issues.apache.org/jira/browse/WHIRR-156
>             Project: Whirr
>          Issue Type: Bug
>          Components: cli
>            Reporter: Stu Hood
>             Fix For: 0.3.0
>
>         Attachments: WHIRR-156.patch, WHIRR-156.patch
>
>
> bin/whirr is looking for the cli jar in the wrong location: the following 
> change works, but would not be forwards compatible:
> {code}-java -jar $bin/../whirr-cli-*.jar "$@"
> +java -jar $bin/../cli/target/whirr-cli-*-incubating-SNAPSHOT.jar "$@"{code}
> Note that the naive forwards compatible approach grabs the source jar instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to