summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 15:59:30 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 15:59:30 (EDT)
commita53e0cbe304dca54ec9c82e59e7b642769be9242 (patch)
tree625544c50c40b8c80a419a580c2ba102851f60b5
parentda3ddca19dbcefc9e0a2d39eb22d7f3a40b7f987 (diff)
ob_set_substvar(): Rename to ob_set_source_substvar()
-rw-r--r--lib/control.sh13
-rw-r--r--lib/package/2.sh12
-rw-r--r--man/local.mk2
3 files changed, 15 insertions, 12 deletions
diff --git a/lib/control.sh b/lib/control.sh
index 94314f3..b5cc5d6 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -177,9 +177,9 @@ ob_parse_control()
return 0
}
-## @brief Set a substitution variable
-## @details \fBob_set_substvar\fP() sets a substitution variable for later use
-## by \fBob_substvars\fP(3).
+## @brief Set a source package substitution variable
+## @details \fBob_set_source_substvar\fP() sets a source package substitution
+## variable for later use by \fBob_substvars\fP(3).
## @operand name req The name of the substitution variable. May only consist
## of uppercase and lowercase Latin letters, digits, and
## hyphens and must be at least one character long.
@@ -187,7 +187,7 @@ ob_parse_control()
## @return Returns 0 on success, or 1 if \fIname\fP is empty or contains invalid
## characters.
## @pure no This function sets an internal global variable.
-ob_set_substvar()
+ob_set_source_substvar()
{
local name="${1}"
local value="${2}"
@@ -223,8 +223,9 @@ ob_set_substvar()
## @brief Substitute variables in text
## @details \fBob_substvars\fP() substitutes variables previously set with
-## \fBob_set_substvar\fP(3) in a string. The format for variable
-## substitutions is \fI${var}\fP, and substitutions can be nested.
+## \fBob_set_source_substvar\fP(3) in a string. The format for
+## variable substitutions is \fI${var}\fP, and substitutions can be
+## nested.
## @operand string req The string in which to substitute variables.
## @return Returns 0 on success or 1 on possible recursion.
## @stderr Prints a warning on possible recursion.
diff --git a/lib/package/2.sh b/lib/package/2.sh
index 4be68aa..40a985d 100644
--- a/lib/package/2.sh
+++ b/lib/package/2.sh
@@ -161,10 +161,12 @@ _ob_set_package_substvars_2()
_ob_substvar_2 ''
fi
- ob_set_substvar 'Source-Version' "$(ob_get_source_parameter 'Version')"
- ob_set_substvar 'Binary-Version' "$(ob_get_source_parameter 'Version')"
- ob_set_substvar 'Host-Arch' "${OPK_HOST_ARCH}"
- ob_set_substvar 'Host-Plat' "${OPK_HOST_PLAT}"
+ ob_set_source_substvar 'Source-Version' \
+ "$(ob_get_source_parameter 'Version')"
+ ob_set_source_substvar 'Binary-Version' \
+ "$(ob_get_source_parameter 'Version')"
+ ob_set_source_substvar 'Host-Arch' "${OPK_HOST_ARCH}"
+ ob_set_source_substvar 'Host-Plat' "${OPK_HOST_PLAT}"
return 0
}
@@ -176,7 +178,7 @@ _ob_substvar_2()
local user_data="${3}"
shift 3 || _ob_abort
- ob_set_substvar "${name}" "${value}"
+ ob_set_source_substvar "${name}" "${value}"
return 0
}
diff --git a/man/local.mk b/man/local.mk
index fbdf532..ee94e1d 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -52,7 +52,7 @@ man3_MANS = \
%reldir%/ob_plat_is_concerned.3 \
%reldir%/ob_get_system_path.3 \
%reldir%/ob_parse_control.3 \
- %reldir%/ob_set_substvar.3 \
+ %reldir%/ob_set_source_substvar.3 \
%reldir%/ob_substvars.3 \
%reldir%/ob_parse_changelog.3 \
%reldir%/ob_parse_dep.3 \