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 @@ -35,17 +35,19 @@ dirCommit() {
3535
3636getArches () {
3737 local repo=" $1 " ; shift
38- local officialImagesUrl= ' https://github.com/docker-library/official-images/raw/master /library/ '
38+ local officialImagesBase= " ${BASHBREW_LIBRARY :- https:// github.com/ docker-library/ official-images/ raw/ HEAD / library} / "
3939
40- eval " declare -g -A parentRepoToArches=( $(
41- find -name ' Dockerfile' -exec awk '
40+ local parentRepoToArchesStr
41+ parentRepoToArchesStr=" $(
42+ find -name ' Dockerfile' -exec awk -v officialImagesBase=" $officialImagesBase " '
4243 toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|.*\/.*)(:|$)/ {
43- print " ' " $officialImagesUrl " ' " $2
44+ printf "%s%s\n", officialImagesBase, $2
4445 }
4546 ' ' {}' + \
4647 | sort -u \
47- | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
48- ) )"
48+ | xargs -r bashbrew cat --format ' ["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"'
49+ ) "
50+ eval " declare -g -A parentRepoToArches=( $parentRepoToArchesStr )"
4951}
5052getArches ' httpd'
5153
You can’t perform that action at this time.
0 commit comments