1 Star 0 Fork 0

Whoisxiang/mysql

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
apply-templates.sh 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
set -Eeuo pipefail
[ -f versions.json ] # run "versions.sh" first
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
jqt='.jq-template.awk'
if [ -n "${BASHBREW_SCRIPTS:-}" ]; then
jqt="$BASHBREW_SCRIPTS/jq-template.awk"
elif [ "$BASH_SOURCE" -nt "$jqt" ]; then
wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/5f0c26381fb7cc78b2d217d58007800bdcfbcfa1/scripts/jq-template.awk'
fi
if [ "$#" -eq 0 ]; then
versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)"
eval "set -- $versions"
fi
generated_warning() {
cat <<-EOH
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
EOH
}
for version; do
export version
debianVersion="$(jq -r '.[env.version].debian // ""' versions.json)"
if [ -n "$debianVersion" ]; then
dockerfile='Dockerfile.debian'
{
generated_warning
gawk -f "$jqt" "template/$dockerfile"
} > "$version/$dockerfile"
fi
cp -a template/docker-entrypoint.sh "$version/docker-entrypoint.sh"
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiang1/mysql.git
git@gitee.com:xiang1/mysql.git
xiang1
mysql
mysql
master

搜索帮助