File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,19 @@ dirCommit() {
53
53
54
54
getArches () {
55
55
local repo=" $1 " ; shift
56
- local officialImagesUrl= ' https://github.com/docker-library/official-images/raw/master /library/ '
56
+ local officialImagesBase= " ${BASHBREW_LIBRARY :- https:// github.com/ docker-library/ official-images/ raw/ HEAD / library} / "
57
57
58
- eval " declare -g -A parentRepoToArches=( $(
59
- find -name ' Dockerfile' -exec awk '
58
+ local parentRepoToArchesStr
59
+ parentRepoToArchesStr=" $(
60
+ find -name ' Dockerfile' -exec awk -v officialImagesBase=" $officialImagesBase " '
60
61
toupper($1) == "FROM" && $2 !~ /^(' " $repo " ' |scratch|.*\/.*)(:|$)/ {
61
- print " ' " $officialImagesUrl " ' " $2
62
+ printf "%s%s\n", officialImagesBase, $2
62
63
}
63
64
' ' {}' + \
64
65
| sort -u \
65
- | xargs bashbrew cat --format ' [{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
66
- ) )"
66
+ | xargs -r bashbrew cat --format ' ["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"'
67
+ ) "
68
+ eval " declare -g -A parentRepoToArches=( $parentRepoToArchesStr )"
67
69
}
68
70
getArches ' openjdk'
69
71
You can’t perform that action at this time.
0 commit comments