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() {
40
40
41
41
getArches () {
42
42
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} / "
44
44
45
- eval " declare -g -A parentRepoToArches=( $(
46
- find -name ' Dockerfile' -exec awk '
45
+ local parentRepoToArchesStr
46
+ parentRepoToArchesStr=" $(
47
+ find -name ' Dockerfile' -exec awk -v officialImagesBase=" $officialImagesBase " '
47
48
toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|.*\/.*)(:|$)/ {
48
- print " ' " $officialImagesUrl " ' " $2
49
+ printf "%s%s\n", officialImagesBase, $2
49
50
}
50
51
' ' {}' + \
51
52
| 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 )"
54
56
}
55
57
getArches ' ruby'
56
58
You can’t perform that action at this time.
0 commit comments