From f1da1182ff26e17cf1f0c4733bb903fab344a7c6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 03 Dec 2013 00:00:00 -0500 Subject: feed_find_pkgs(): Write to a filenames file --- (limited to 'lib') 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 -- cgit v0.9.1