summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/metadata/proteanos.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/metadata/proteanos.sh b/lib/metadata/proteanos.sh
index cc8f5b4..6ff84e2 100644
--- a/lib/metadata/proteanos.sh
+++ b/lib/metadata/proteanos.sh
@@ -21,6 +21,12 @@
_OB_METADATA_PROTEANOS_SM='true'
_OB_NAME_RE_PROTEANOS='^[a-z0-9][a-z0-9+.-]+$'
+_OB_VERSION_RE_PROTEANOS='^'
+_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'[0-9a-z.~]+'
+_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'(\+sip[1-9][0-9]*)?'
+_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'(-[1-9][0-9]*)?'
+_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'(\+[a-z0-9]+-[1-9][0-9]*)?'
+_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'$'
_ob_validate_source_name_proteanos()
{
@@ -47,3 +53,40 @@ _ob_validate_binary_name_proteanos()
_ob_return ${?}
return ${?}
}
+
+_ob_validate_version_proteanos()
+{
+ _ob_local _obvvpro_version
+
+ _obvvpro_version="${1}"
+
+ echo "${_obvvpro_version}" | grep -E "${_OB_VERSION_RE_PROTEANOS}" \
+ >/dev/null 2>&1
+
+ _ob_return ${?}
+ return ${?}
+}
+
+_ob_get_upstreamver_proteanos()
+{
+ _ob_local _obguvpro_version
+
+ _obguvpro_version="${1}"
+
+ echo "${_obguvpro_version%%-*}"
+
+ _ob_return 0
+ return ${?}
+}
+
+_ob_get_distrev_proteanos()
+{
+ _ob_local _obgdrpro_version
+
+ _obgdrpro_version="${1}"
+
+ echo "${_obgdrpro_version#*-}"
+
+ _ob_return 0
+ return ${?}
+}