diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/feed.sh | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/feed.sh b/src/feed.sh index d45e977..94f9b62 100644 --- a/src/feed.sh +++ b/src/feed.sh @@ -112,39 +112,6 @@ feed_download_cert() return 0 } -feed_find_pkgs() -{ - local feed_idx="${1}" - local dep_fields="${2}" - local pkg_cb="${3}" - local deps_cb="${4}" - local fname_cb="${5}" - local md5sum_cb="${6}" - local sha256sum_cb="${7}" - shift 7 - - 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}" - feed_md5sum_cb="${md5sum_cb}" - feed_sha256sum_cb="${sha256sum_cb}" - - feed_pkgs='' - feed_pkg_include='false' - feed_pkg='' - feed_deps='' - - parse_control '-' feed_field_cb feed_para_cb 'Package' <<-EOF - $({ ${GUNZIP} -c -- "${feed_idx}" || cat "${feed_idx}"; } \ - 2>/dev/null) - EOF - - printf '%s\n' "${feed_pkgs# }" - - return 0 -} - feed_field_cb() { local name="${1}" @@ -206,3 +173,36 @@ feed_para_cb() return 0 } + +feed_find_pkgs() +{ + local feed_idx="${1}" + local dep_fields="${2}" + local pkg_cb="${3}" + local deps_cb="${4}" + local fname_cb="${5}" + local md5sum_cb="${6}" + local sha256sum_cb="${7}" + shift 7 + + 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}" + feed_md5sum_cb="${md5sum_cb}" + feed_sha256sum_cb="${sha256sum_cb}" + + feed_pkgs='' + feed_pkg_include='false' + feed_pkg='' + feed_deps='' + + parse_control '-' feed_field_cb feed_para_cb 'Package' <<-EOF + $({ ${GUNZIP} -c -- "${feed_idx}" || cat "${feed_idx}"; } \ + 2>/dev/null) + EOF + + printf '%s\n' "${feed_pkgs# }" + + return 0 +} |