1 Star 2 Fork 1

AtomHub/official-images

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
_bashbrew-cat-sorted.sh 975 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
set -Eeuo pipefail
# a mimic of "bashbrew cat" which should sort slightly more deterministically (so even full-order-changing PRs should have reasonable diffs)
images="$(
bashbrew list --repos --uniq "$@" \
| sort -uV \
| xargs -r bashbrew list --repos --uniq --build-order
)"
set -- $images
declare -A seenGlobal=()
first=1
for img; do
if [ -n "$first" ]; then
first=
else
echo; echo
fi
if [ "$#" -gt 1 ]; then
echo "# $img"
fi
repo="${img%:*}"
if [ -z "${seenGlobal["$repo"]:-}" ]; then
bashbrew cat --format '{{ printf "%s\n" (.Manifest.Global.ClearDefaults defaults) }}' "$img"
seenGlobal["$repo"]="$img"
else
echo "# (see also ${seenGlobal["$repo"]} above)"
fi
bashbrew list --uniq "$img" \
| sort -V \
| xargs -r bashbrew list --uniq --build-order \
| xargs -r bashbrew cat --format '
{{- range $e := .TagEntries -}}
{{- printf "\n%s\n" ($e.ClearDefaults $.Manifest.Global) -}}
{{- end -}}
'
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/atomhub/official-images.git
[email protected]:atomhub/official-images.git
atomhub
official-images
official-images
master

搜索帮助