1 Star 0 Fork 0

canpool/pycanpool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
env.bash 642 Bytes
一键复制 编辑 原始数据 按行查看 历史
canpool 提交于 2024-05-26 22:55 +08:00 . env: add env.bash for developing
#!/usr/bin/env bash
# Copyright (c) 2021-2022 maminjie <canpool@163.com>
# SPDX-License-Identifier: MulanPSL-2.0
# Config environment before develop, please run: source env.bash
root_path=$(cd $(dirname ${BASH_SOURCE}); pwd)
python_paths=$(echo ${PYTHONPATH} | sed 's/:/ /g')
existed=0
for path in $python_paths; do
if [[ "$root_path" = "$path" ]]; then
existed=1; break
fi
done
if [[ $existed -eq 0 ]]; then
user_path=${root_path}:${root_path}/projects
if [[ -z "${PYTHONPATH}" ]]; then
export PYTHONPATH=${user_path}
else
export PYTHONPATH=${PYTHONPATH}:${user_path}
fi
fi
echo "PYTHONPATH=${PYTHONPATH}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/icanpool/pycanpool.git
git@gitee.com:icanpool/pycanpool.git
icanpool
pycanpool
pycanpool
master

搜索帮助