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 @@ -49,17 +49,19 @@ dirCommit() {
49
49
50
50
getArches () {
51
51
local repo=" $1 " ; shift
52
- local officialImagesUrl= ' https://github.com/docker-library/official-images/raw/master /library/ '
52
+ local officialImagesBase= " ${BASHBREW_LIBRARY :- https:// github.com/ docker-library/ official-images/ raw/ HEAD / library} / "
53
53
54
- eval " declare -g -A parentRepoToArches=( $(
55
- find -name Dockerfile -exec awk '
54
+ local parentRepoToArchesStr
55
+ parentRepoToArchesStr=" $(
56
+ find -name ' Dockerfile' -exec awk -v officialImagesBase=" $officialImagesBase " '
56
57
/^FROM/ {
57
58
if (index($2, ":") > 0 && index($2, "' " $repo " ' ") == 0) {
58
- print " ' " $officialImagesUrl " ' " $2
59
+ printf "%s%s\n", officialImagesBase, $2
59
60
}
60
61
}' ' {}' + | sort -u \
61
- | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
62
- ) )"
62
+ | xargs -r bashbrew cat --format ' ["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"'
63
+ ) "
64
+ eval " declare -g -A parentRepoToArches=( $parentRepoToArchesStr )"
63
65
}
64
66
getArches ' rabbitmq'
65
67
You can’t perform that action at this time.
0 commit comments