From 98b847494d8f41e8c50e6222cf2b8c0657f0022c Mon Sep 17 00:00:00 2001
From: lyn1001 <thistleslyn@163.com>
Date: Mon, 11 Oct 2021 11:05:57 +0800
Subject: [PATCH] fix ooziedb command not found jar path


diff --git a/tools/src/main/bin/ooziedb.sh b/tools/src/main/bin/ooziedb.sh
index b9e38af..7b75e2b 100644
--- a/tools/src/main/bin/ooziedb.sh
+++ b/tools/src/main/bin/ooziedb.sh
@@ -42,13 +42,13 @@ OOZIEDB_OPTS="${OOZIEDB_OPTS} -Doozie.data.dir=${OOZIE_DATA}";
 OOZIEDB_OPTS="${OOZIEDB_OPTS} -Dderby.stream.error.file=${OOZIE_LOG}/derby.log"
 
 #Create lib directory from war if lib doesn't exist
-if [ ! -d "${BASEDIR}/lib" ]; then
-  mkdir ${BASEDIR}/lib
-  unzip ${BASEDIR}/oozie.war WEB-INF/lib/*.jar -d ${BASEDIR}/lib > /dev/null
-  mv ${BASEDIR}/lib/WEB-INF/lib/*.jar ${BASEDIR}/lib/
-  rmdir ${BASEDIR}/lib/WEB-INF/lib
-  rmdir ${BASEDIR}/lib/WEB-INF
-fi
+#if [ ! -d "${BASEDIR}/lib" ]; then
+#  mkdir ${BASEDIR}/lib
+#  unzip ${BASEDIR}/oozie.war WEB-INF/lib/*.jar -d ${BASEDIR}/lib > /dev/null
+#  mv ${BASEDIR}/lib/WEB-INF/lib/*.jar ${BASEDIR}/lib/
+#  rmdir ${BASEDIR}/lib/WEB-INF/lib
+#  rmdir ${BASEDIR}/lib/WEB-INF
+#fi
 
 OOZIECPPATH=""
 for i in "${BASEDIR}/libtools/"*.jar; do
@@ -60,6 +60,9 @@ done
 for i in "${BASEDIR}/libext/"*.jar; do
   OOZIECPPATH="${OOZIECPPATH}:$i"
 done
+for i in "${BASEDIR}/embedded-oozie-server/webapp/WEB-INF/lib/"*.jar; do
+   OOZIECPPATH="${OOZIECPPATH}:$i"
+done
 
 
 if test -z ${JAVA_HOME}
-- 
2.23.0

