summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/control.sh13
-rw-r--r--lib/package/2.sh12
2 files changed, 14 insertions, 11 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
}