File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -40,17 +40,19 @@ dirCommit() {
4040
4141getArches () {
4242 local repo=" $1 " ; shift
43- local officialImagesUrl= ' https://github.com/docker-library/official-images/raw/master /library/ '
43+ local officialImagesBase= " ${BASHBREW_LIBRARY :- https:// github.com/ docker-library/ official-images/ raw/ HEAD / library} / "
4444
45- eval " declare -A -g parentRepoToArches=( $(
46- find -name ' Dockerfile' -exec awk '
45+ local parentRepoToArchesStr
46+ parentRepoToArchesStr=" $(
47+ find -name ' Dockerfile' -exec awk -v officialImagesBase=" $officialImagesBase " '
4748 toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|.*\/.*)(:|$)/ {
48- print " ' " $officialImagesUrl " ' " $2
49+ printf "%s%s\n", officialImagesBase, $2
4950 }
5051 ' ' {}' + \
5152 | sort -u \
52- | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
53- ) )"
53+ | xargs -r bashbrew cat --format ' ["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"'
54+ ) "
55+ eval " declare -g -A parentRepoToArches=( $parentRepoToArchesStr )"
5456}
5557getArches ' docker'
5658
You can’t perform that action at this time.
0 commit comments