summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/metadata.sh16
1 files changed, 16 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