summaryrefslogtreecommitdiffstats
path: root/components/datalake-handler/feeder/src
diff options
context:
space:
mode:
authorKate Hsuan <kate.hsuan@qct.io>2020-03-23 06:27:38 +0000
committerKate Hsuan <kate.hsuan@qct.io>2020-03-23 06:31:32 +0000
commit13ae3c9a7a43fb06d415c83eb1bf357d86efddcd (patch)
tree3d0ab510582b16a81c9f54e16635a477ccf127be /components/datalake-handler/feeder/src
parent4a9318d693e3331253fb4f319738a282bfa15214 (diff)
Fix jar file search.
Issue-ID: DCAEGEN2-2008 Signed-off-by: Kate Hsuan <kate.hsuan@qct.io> Change-Id: I46a539efdbbf6d2a9762966cb4740af7f3fd20f6
Diffstat (limited to 'components/datalake-handler/feeder/src')
-rw-r--r--components/datalake-handler/feeder/src/assembly/run.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/components/datalake-handler/feeder/src/assembly/run.sh b/components/datalake-handler/feeder/src/assembly/run.sh
index a061bfcf..0f9bac41 100644
--- a/components/datalake-handler/feeder/src/assembly/run.sh
+++ b/components/datalake-handler/feeder/src/assembly/run.sh
@@ -6,10 +6,13 @@ echo "start init db ..."
echo "finish init db"
-cmd=`ls feeder-*.jar`
-if [ -z "$cmd" ]; then
- echo "STRING is empty"
- sleep 10000
-else
+cmd=`find . -regex '\./feeder-[0-9]+\.[0-9]+\.[0-9]+[-SNAPSHOT]+\.jar'`
+cmd1= `find . -regex '\./feeder-[0-9]+\.[0-9]+\.[0-9]+\.jar'`
+if [ -n "$cmd" ]; then
+ java -jar $cmd
+elif [ -n "$cmd1" ]; then
java -jar $cmd
+else
+ echo"STRING is empty"
+ sleep 10000
fi