summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/feed.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/feed.sh b/lib/feed.sh
index 85660d7..08e7acd 100644
--- a/lib/feed.sh
+++ b/lib/feed.sh
@@ -27,6 +27,7 @@ feed_pkg_cb=
feed_dep_fields=
feed_pkgs=
feed_deps_fd=
+feed_fnames_fd=
feed_pkg_include=
feed_pkg=
feed_deps=
@@ -40,11 +41,13 @@ feed_download()
return 0
}
+# TODO: Write to a filenames file.
feed_find_pkgs()
{
local pkg_cb="${1}"
local dep_fields="${2}"
local deps_file="${3}"
+ local fnames_file="${4}"
feed_pkg_cb="${pkg_cb}"
feed_dep_fields=" $(printf '%s ' ${dep_fields})"
@@ -52,6 +55,8 @@ feed_find_pkgs()
fopen "${deps_file}" 'a'
feed_deps_fd=${FD}
+ fopen "${fnames_file}" 'a'
+ feed_fnames_fd=${FD}
feed_pkg_include='false'
feed_pkg=''
@@ -73,6 +78,8 @@ feed_field_cb()
if [ "x${name}" = 'xPackage' ]; then
feed_pkg="${value}"
+ elif [ "x${name}" = 'xFilename' ]; then
+ printf '%s %s\n' "${feed_pkg}" "${value}" >&${feed_fnames_fd}
elif [ "x${feed_dep_fields#* ${name} }" != "x${feed_dep_fields}" ]; then
feed_deps="${feed_deps}${value}, "
fi