summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-25 23:33:12 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-25 23:33:12 (EDT)
commit13ca657716d5b6920629b68ade7781212f5833d7 (patch)
tree8d69b169a252bd425203198fd5c95ea2fcd6dc2a /src
parent7462b8e7d1cdac4cd60ce17dbd5961cd0e709820 (diff)
src/package/2.sh: Define callbacks before references
Diffstat (limited to 'src')
-rw-r--r--src/package/2.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/package/2.sh b/src/package/2.sh
index 4fa4286..75785a9 100644
--- a/src/package/2.sh
+++ b/src/package/2.sh
@@ -20,6 +20,22 @@
package_2_build_deps=
+package_2_build_deps_field_cb()
+{
+ local name="${1}"
+ local value="${2}"
+ shift 2
+
+ name="$(printf '%s\n' "${name}" | tr 'A-Z' 'a-z')"
+
+ if [ "x${name}" = 'xbuild-depends' ]; then
+ package_2_build_deps="${value}"
+ return 1
+ fi
+
+ return 0
+}
+
package_2_get_build_deps()
{
local arch="${1}"
@@ -36,18 +52,13 @@ package_2_get_build_deps()
return 0
}
-package_2_build_deps_field_cb()
+package_2_substvar_cb()
{
local name="${1}"
local value="${2}"
shift 2
- name="$(printf '%s\n' "${name}" | tr 'A-Z' 'a-z')"
-
- if [ "x${name}" = 'xbuild-depends' ]; then
- package_2_build_deps="${value}"
- return 1
- fi
+ set_substvar "${name}" "${value}"
return 0
}
@@ -68,14 +79,3 @@ package_2_set_substvars()
return 0
}
-
-package_2_substvar_cb()
-{
- local name="${1}"
- local value="${2}"
- shift 2
-
- set_substvar "${name}" "${value}"
-
- return 0
-}