Squashed commit of the following:
commit 065238d830e1bf237cf5b5d74f987827cbe3ba61
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.
This commit is contained in:
parent
d7f95775de
commit
a131ce0535
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user