1 Star 0 Fork 1

c_mengjiao/kafka-docker

forked from BreakLo0p/kafka-docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
download-kafka.sh 739 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh -e
# shellcheck disable=SC1091
source "/usr/bin/versions.sh"
FILENAME="kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz"
url=$(curl --stderr /dev/null "https://www.apache.org/dyn/closer.cgi?path=/kafka/${KAFKA_VERSION}/${FILENAME}&as_json=1" | jq -r '"\(.preferred)\(.path_info)"')
# Test to see if the suggested mirror has this version, currently pre 2.1.1 versions
# do not appear to be actively mirrored. This may also be useful if closer.cgi is down.
if [[ ! $(curl -s -f -I "${url}") ]]; then
echo "Mirror does not have desired version, downloading direct from Apache"
url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/${FILENAME}"
fi
echo "Downloading Kafka from $url"
wget "${url}" -O "/tmp/${FILENAME}"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/c_mengjiao/kafka-docker.git
git@gitee.com:c_mengjiao/kafka-docker.git
c_mengjiao
kafka-docker
kafka-docker
master

搜索帮助