summaryrefslogtreecommitdiffstats
path: root/src/dist/libiquity.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/dist/libiquity.sh')
-rw-r--r--src/dist/libiquity.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/dist/libiquity.sh b/src/dist/libiquity.sh
index 66596be..d4fced8 100644
--- a/src/dist/libiquity.sh
+++ b/src/dist/libiquity.sh
@@ -35,10 +35,17 @@ dist_libiquity_get_versions()
local mirror="${1}"
local board="${2}"
shift 2
- local version=
local versions=''
+ local version=
- while read -r version; do
+ if ! versions="$(dl "${mirror}/Manifest")"; then
+ err 'Failed to download list of firmware versions'
+ return 1
+ fi
+
+ IFS="${LF}"
+ for version in ${versions}; do
+ unset IFS
case "${version}" in
'libiquity-20150501')
# This version had unique ROM organization.
@@ -60,9 +67,8 @@ dist_libiquity_get_versions()
grep -F " ${archive}" >/dev/null 2>&1; then
versions="${versions} ${version}"
fi
- done <<-EOF
- $(dl "${mirror}/Manifest")
- EOF
+ done
+ unset IFS
printf '%s ' ${versions}
return 0