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