summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/metadata.sh16
-rw-r--r--man/local.mk2
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh
index d635e8e..fd64a13 100644
--- a/lib/metadata.sh
+++ b/lib/metadata.sh
@@ -126,6 +126,14 @@ ob_parse_version()
return 0
}
+## @brief Get the running system's architecture
+## @details \fBob_get_system_arch\fP gets the architecture of the build
+## (running) system using the metadata plugin selected at libopkbuild's
+## build time.
+## @return Returns 0 on success, 1 if the system's architecture cannot be
+## determined, or 125 if given any arguments.
+## @stdout Prints the system's architecture.
+## @pure yes This function has no side effects.
ob_get_system_arch()
{
if [ ${#} -gt 0 ]; then
@@ -137,6 +145,14 @@ ob_get_system_arch()
return ${?}
}
+## @brief Get the running system's platform
+## @details \fBob_get_system_arch\fP gets the platform of the build (running)
+## system using the metadata plugin selected at libopkbuild's build
+## time.
+## @return Returns 0 on success, 1 if the system's platform cannot be
+## determined, or 125 if given any arguments.
+## @stdout Prints the system's platform.
+## @pure yes This function has no side effects.
ob_get_system_plat()
{
if [ ${#} -gt 0 ]; then
diff --git a/man/local.mk b/man/local.mk
index abd17e2..535fad8 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -32,6 +32,8 @@ man1_MANS = $(man1_sources:.1in=.1)
man3_MANS = \
%reldir%/ob_error.3 \
%reldir%/ob_get_msg.3 \
+ %reldir%/ob_get_system_arch.3 \
+ %reldir%/ob_get_system_plat.3 \
%reldir%/ob_get_text_domain.3 \
%reldir%/ob_info.3 \
%reldir%/ob_parse_changelog.3 \