1 Star 0 Fork 5

HarkerYX/oceanbase-diagnostic-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
obdiag 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
靖顺 提交于 2023-03-13 15:50 . odt 1.0.0 release
#!/bin/bash
####
OBDIAG_PYTHON="python"
####
whitespace="[[:space:]]"
final_str=""
blank_str=" "
OBDIAG_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PY_VERSION=`$OBDIAG_PYTHON -V 2>&1|awk '{print $2}'|awk -F '.' '{print $1}'`
if (( $PY_VERSION == 3 ))
then
echo "your python version is $PY_VERSION"
export LD_LIBRARY_PATH=$(ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | awk -F\" '{print $2}' | sed 's/=//' | tr '\n' ':')$OBDIAG_DIR/dependencies/python3/libs/
export PYTHONPATH=$OBDIAG_DIR/dependencies/python3/site-packages:$PYTHONPATH
$OBDIAG_PYTHON ./dependencies/check_dependencies.py
elif (( $PY_VERSION == 2 ))
then
echo "your python version is $PY_VERSION"
export LD_LIBRARY_PATH=$(ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | awk -F\" '{print $2}' | sed 's/=//' | tr '\n' ':')$OBDIAG_DIR/dependencies/python2/libs/
export PYTHONPATH=$OBDIAG_DIR/dependencies/python2/site-packages:$PYTHONPATH
$OBDIAG_PYTHON ./dependencies/check_dependencies.py
else
echo "Please make sure Python exists in your environment"
fi
for i in "$@"
do
if [[ $i =~ $whitespace ]]
then
i="\"$i\""
fi
final_str=${final_str}${blank_str}${i}
done
PROG="$0" $OBDIAG_PYTHON ./obdiag_main.py $final_str
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yexiang588/oceanbase-diagnostic-tool.git
[email protected]:yexiang588/oceanbase-diagnostic-tool.git
yexiang588
oceanbase-diagnostic-tool
oceanbase-diagnostic-tool
master

搜索帮助