Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 065238d
Author: Guillem Nieto <gnieto@scopely.com>
Date:   Thu May 9 17:01:37 2019 +0200

    Cast to int wc jar count

    While using Kyuubi on my local environment (OSX) I'm having issues with
    `wc` returning the result with a preffixed tab character.

    Due to this issue, it fails to compare "	1" with "1" and script
    is aborted due to duplicated JARs found.

    To solve that, I'm casting `wc` result to integer and perform integer
    comparisions, which seems to solve the issue.
  • Loading branch information
gnieto authored and yaooqinn committed May 10, 2019
1 parent d7f9577 commit a131ce0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/start-kyuubi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ if [[ -z "$KYUUBI_JAR_DIR" ]]; then
fi

KYUUBI_JAR_NUM="$(ls ${KYUUBI_JAR_DIR} | grep kyuubi-server | grep .jar | grep -v original | wc -l)"
KYUUBI_JAR_NUM=$((${KYUUBI_JAR_NUM}))

if [[ ${KYUUBI_JAR_NUM} = "0" ]]; then
if [[ ${KYUUBI_JAR_NUM} = 0 ]]; then
echo "Kyuubi Server: need to build kyuubi first. Run ./build/mvn clean package" >&2
exit 1
fi

if [[ ${KYUUBI_JAR_NUM} != "1" ]]; then
if [[ ${KYUUBI_JAR_NUM} != 1 ]]; then
echo "Kyuubi Server: duplicated kyuubi jars found. Run ./build/mvn clean package" >&2
exit 1
fi
Expand Down

0 comments on commit a131ce0

Please sign in to comment.