summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dist/libiquity.sh16
-rw-r--r--src/dist/libreboot.sh13
2 files changed, 19 insertions, 10 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
diff --git a/src/dist/libreboot.sh b/src/dist/libreboot.sh
index 1b30e72..00d53ca 100644
--- a/src/dist/libreboot.sh
+++ b/src/dist/libreboot.sh
@@ -49,10 +49,14 @@ dist_libreboot_get_versions()
local mirror="${1}"
local board="${2}"
shift 2
- local version=
local versions=''
+ local version=
+
+ versions='20150518' # Hardcode this list until a manifest is available.
- while read -r version; do
+ IFS="${LF}"
+ for version in ${versions}; do
+ unset IFS
case "${version}" in
201[34]* | 20150[1-4]*)
# These versions had ROMs in X60_binary.tar.gz,
@@ -74,9 +78,8 @@ dist_libreboot_get_versions()
grep -F " ${archive}" >/dev/null 2>&1; then
versions="${versions} ${version}"
fi
- done <<-EOF
- 20150518 $(: Hardcode this list until a manifest is available)
- EOF
+ done
+ unset IFS
printf '%s ' ${versions}
return 0