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