summaryrefslogtreecommitdiffstats
path: root/lib/feed.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feed.sh')
-rw-r--r--lib/feed.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/feed.sh b/lib/feed.sh
index feaf7ba..e4ae040 100644
--- a/lib/feed.sh
+++ b/lib/feed.sh
@@ -61,7 +61,7 @@ feed_find_pkgs()
local md5sum_cb="${6}"
local sha256sum_cb="${7}"
- feed_dep_fields=" $(printf '%s ' ${dep_fields})"
+ feed_dep_fields=" $(printf '%s ' ${dep_fields} | tr 'A-Z' 'a-z')"
feed_pkg_cb="${pkg_cb}"
feed_deps_cb="${deps_cb}"
feed_fname_cb="${fname_cb}"
@@ -85,14 +85,15 @@ feed_field_cb()
local name="${1}"
local value="${2}"
- # TODO: These field name checks should be case insensitive.
- if [ "x${name}" = 'xPackage' ]; then
+ name="$(printf '%s\n' "${name}" | tr 'A-Z' 'a-z')"
+
+ if [ "x${name}" = 'xpackage' ]; then
feed_pkg="${value}"
- elif [ "x${name}" = 'xFilename' ]; then
+ elif [ "x${name}" = 'xfilename' ]; then
${feed_fname_cb} "${feed_pkg}" "${value}"
- elif [ "x${name}" = 'xMD5sum' ]; then
+ elif [ "x${name}" = 'xmd5sum' ]; then
${feed_md5sum_cb} "${feed_pkg}" "${value}"
- elif [ "x${name}" = 'xSHA256sum' ]; then
+ elif [ "x${name}" = 'xsha256sum' ]; then
${feed_sha256sum_cb} "${feed_pkg}" "${value}"
elif [ "x${feed_dep_fields#* ${name} }" != "x${feed_dep_fields}" ]; then
feed_deps="${feed_deps}${value}, "