1 Star 0 Fork 18

yuchao/compatibility-assessment_1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
start.sh 2.18 KB
一键复制 编辑 原始数据 按行查看 历史
蒋宏博 提交于 2023-07-10 16:26 . feature datakit支持兼容性评估
#!/bin/bash
# Copyright (c): 2023-2023, Huawei Tech. Co., Ltd.
VERSION=5.1.0
dataSource=""
confFile=""
reportFile=""
jarName="compatibility-assessment-${VERSION}.jar"
function print_help()
{
echo "Usage: $0 [OPTION]
-h|--help show help information
-d|--dataSource this values of paramenter is collect or file
-c|--confFile the path of configure file
-o|--output output file, must be .html, default is report.html.
"
}
function startJar() {
cmd="java -jar"
if [ "${dataSource}"X = "file"X ]; then
cmd="${cmd} -Djavax.xml.accessExternalDTD=all ${jarName}"
fi
cmd="${cmd} ${jarName} -d ${dataSource}"
if [ "${confFile}"X != X ]; then
cmd="${cmd} -c ${confFile}"
fi
if [ "${reportFile}"X != X ]; then
cmd="${cmd} -o ${reportFile}"
fi
echo ${cmd}
$cmd
}
function main() {
while [ $# -gt 0 ]; do
case "$1" in
-h|--help)
print_help
exit 1
;;
-d|--dataSource)
if [ "$2"X = X ]; then
echo "no given correct dataSource information"
exit 1
fi
dataSource=$2
shift 2
;;
-c|--confFile)
if [ "$2"X = X ]; then
echo "no given configure file"
exit 1
fi
confFile=$2
shift 2
;;
-o|--output)
if [ "$2"X = X ]; then
echo "no given output file"
exit 1
fi
reportFile=$2
shift 2
;;
*)
echo "Internal Error: option processing error: $1" 1>&2
echo "please input right paramtenter, the following command may help you"
echo "./start.sh --help or ./start.sh -h"
exit 1
esac
done
if [ "${dataSource}"X = X ]; then
echo "Error: optional -d or --dataSource must specified."
exit 1
fi
startJar
}
main $@
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yuchao111222/compatibility-assessment_1.git
git@gitee.com:yuchao111222/compatibility-assessment_1.git
yuchao111222
compatibility-assessment_1
compatibility-assessment_1
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385