@@ -46,10 +46,10 @@ function get_arch() {
46
46
}
47
47
48
48
# Get corresponding variants based on the architecture.
49
- # All supported variants of each supported architecutre are listed in a
49
+ # All supported variants of each supported architecture are listed in a
50
50
# file - 'architectures'. Its format is:
51
- # <architecutre 1> <supported variant 1 >,<supported variant 2>...
52
- # <architecutre 2> <supported variant 1 >,<supported variant 2>...
51
+ # <architecture 1> <supported variant 1 >,<supported variant 2>...
52
+ # <architecture 2> <supported variant 1 >,<supported variant 2>...
53
53
function get_variants() {
54
54
local dir
55
55
dir=${1:- .}
@@ -133,33 +133,17 @@ function get_config() {
133
133
134
134
# Get available versions for a given path
135
135
#
136
- # If full or partial versions are provided then they are processed and
137
- # validated. e.g. "6 chakracore" returns "6 chakracore/8" since it processed the
138
- # chakracore entry and found it to be a fork rather than a complete version.
139
- #
140
136
# The result is a list of valid versions.
141
137
function get_versions() {
142
- local prefix
143
- prefix=${1:- .}
144
- shift
145
-
146
138
local versions=()
147
- local dirs=(" $@ " )
139
+ local dirs=()
148
140
149
141
local default_variant
150
142
default_variant=$( get_config " ./" " default_variant" )
151
- if [ ${# dirs[@]} -eq 0 ]; then
152
- IFS=' ' read -ra dirs <<< " $(echo " ${prefix%/ } /" */)"
153
- fi
143
+ IFS=' ' read -ra dirs <<< " $(echo " ./" */)"
154
144
155
145
for dir in " ${dirs[@]} " ; do
156
- if [ -a " ${dir} /config" ]; then
157
- local subdirs
158
- IFS=' ' read -ra subdirs <<< " $(get_versions " ${dir# ./ } " )"
159
- for subdir in " ${subdirs[@]} " ; do
160
- versions+=(" ${subdir} " )
161
- done
162
- elif [ -a " ${dir} /Dockerfile" ] || [ -a " ${dir} /${default_variant} /Dockerfile" ]; then
146
+ if [ -a " ${dir} /Dockerfile" ] || [ -a " ${dir} /${default_variant} /Dockerfile" ]; then
163
147
versions+=(" ${dir# ./ } " )
164
148
fi
165
149
done
0 commit comments