#!/bin/bash

jars_path=/data/datalake/jars
jdk_path=/opt/jdk1.8.0_162/bin/java

arguments=$@
# 手动上传jar包则注释掉这行，更显神通吧反正是
curl http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.124:36800/file/download/service-cli-runner-1.0.0-SNAPSHOT.jar -o ${jars_path}/service-cli-runner.jar
${jdk_path} -jar ${jars_path}/service-cli-runner.jar \
  --spring.profiles.active=b12 \
  --deploy.generate.command=true \
  --deploy.generate.command-pro=true \
  --deploy.generate.uploader=true \
  --deploy.generate.update-jar=true \
  $arguments

chmod +x check/*.sh
chmod +x cloud/*.sh
chmod +x command/cli*
chmod +x command/*.sh
chmod +x command-pro/cli*
chmod +x command-pro/*.sh
chmod +x uploader/*.sh
chmod +x *.sh
