6 Star 4 Fork 6

Gitee 极速下载/ceph-deploy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/ceph/ceph-deploy
克隆/下载
bootstrap 3.73 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
set -e
# Use `./bootstrap 3` for Python 3
python_executable="python$1"
if ! [ -d virtualenv ]; then
if command -v lsb_release >/dev/null 2>&1; then
if [ "$1" = "2" ]; then
python_package="python"
python_virtualenv_package="python-virtualenv"
else
python_package="python$1"
python_virtualenv_package="python$1-virtualenv"
fi
case "$(lsb_release --id --short)" in
Ubuntu|Debian)
for package in "$python_package" "$python_virtualenv_package"; do
if [ "$(dpkg --status -- "$package" 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
# add a space after old values
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo " sudo apt-get install $missing"
exit 1
fi
;;
Arch)
for package in "$python_package" python-virtualenv; do
if ! pacman -Qs -- "$package" >/dev/null 2>&1; then
# add a space after old values
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo " pacman -Sy $missing"
exit 1
fi
;;
esac
case "$(lsb_release --id --short | awk '{print $1}')" in
openSUSE|SUSE)
for package in "$python_package" python-virtualenv; do
if [ "$(rpm -qa "$package" 2>/dev/null)" == "" ]; then
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo " sudo zypper install $missing"
exit 1
fi
;;
esac
fi
if [ -f /etc/redhat-release ]; then
case "$(cat /etc/redhat-release | awk '{print $1}')" in
CentOS)
for package in python-virtualenv; do
if [ "$(rpm -qa "$package" 2>/dev/null)" == "" ]; then
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo " sudo yum install $missing"
exit 1
fi
if [ "${1:-2}" -ge 3 ]; then
if ! command -v "$python_executable" >/dev/null 2>&1; then
echo "$0: missing Python ($python_executable), please install it"
exit 1
fi
# Make a temporary virtualenv to get a fresh version of virtualenv
# and use it to make a Python 3 virtualenv,
# because CentOS 7 has buggy old virtualenv (v1.10.1)
# https://github.com/pypa/virtualenv/issues/463
virtualenv virtualenv_tmp
virtualenv_tmp/bin/pip install --upgrade setuptools
virtualenv_tmp/bin/pip install --upgrade virtualenv
virtualenv_tmp/bin/virtualenv -p "$python_executable" virtualenv
rm -rf virtualenv_tmp
else
virtualenv virtualenv
fi
;;
esac
fi
fi
test -d virtualenv || virtualenv -p "$python_executable" virtualenv
./virtualenv/bin/pip install --upgrade setuptools
./virtualenv/bin/python setup.py develop
test -e ceph-deploy || ln -s virtualenv/bin/ceph-deploy .
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mirrors/ceph-deploy.git
git@gitee.com:mirrors/ceph-deploy.git
mirrors
ceph-deploy
ceph-deploy
master

搜索帮助