This is an automated email from the ASF dual-hosted git repository.

zhaijia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new a082e26  Fix bin/bookkeeper to work with release
a082e26 is described below

commit a082e26129ef88f46f676e359011a5736e8dc7db
Author: Ivan Kelly <[email protected]>
AuthorDate: Mon Dec 4 21:26:18 2017 +0800

    Fix bin/bookkeeper to work with release
    
    Part of the assembly process prepends the package name to the
    bookkeeper-server, which wasn't taken into account by
    bin/bookkeeper. This change takes it into account.
    
    It also stops the script from printing a warning if a directory
    doesn't exist.
    
    Author: Ivan Kelly <[email protected]>
    
    Reviewers: Jia Zhai <None>
    
    This closes #803 from ivankelly/bad-script
---
 bookkeeper-server/bin/bookkeeper | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/bookkeeper-server/bin/bookkeeper b/bookkeeper-server/bin/bookkeeper
index ae20927..b3510e3 100755
--- a/bookkeeper-server/bin/bookkeeper
+++ b/bookkeeper-server/bin/bookkeeper
@@ -71,13 +71,15 @@ fi
 
 find-server-jar() {
   DIR=$1
-  cd $DIR
-  for f in *.jar; do
-    if [[ $f =~ ^bookkeeper-server-[0-9\\.]*(-SNAPSHOT)?.jar$ ]]; then
-      echo $DIR/$f
-        return
-    fi
-  done
+  if [ -d $DIR ]; then
+    cd $DIR
+    for f in *.jar; do
+      if [[ $f =~ 
^(org.apache.bookkeeper-)?bookkeeper-server-[0-9\\.]*(-SNAPSHOT)?.jar$ ]]; then
+        echo $DIR/$f
+          return
+      fi
+    done
+  fi
 }
 
 RELEASE_JAR=$(find-server-jar ${BK_HOME})

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to