summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-25 19:48:36 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-25 19:48:36 (EDT)
commit7083680b1167a9a4f8ef2c4cc8354d23fba58a03 (patch)
treead006c5522b45c1c03b8f844bca3db438c4df0ff
parent3b4faf7fdfe450c5fe044c5f1740d83fc36b2ce3 (diff)
src/feed.sh: Define functions before references
-rw-r--r--src/feed.sh66
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
+}