diff options
author | P. J. McDermott <pjm@nac.net> | 2013-08-18 11:16:53 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-08-18 11:16:53 (EDT) |
commit | e3af962c2ed77d26c2b039fadf3779739fabfde2 (patch) | |
tree | adb5b9297afe6937df14708e22ee845fda508c85 /lib | |
parent | 8dd22d349ccf6ef3433385bfc3ffc54a9f192bbe (diff) |
lib/metadata/proteanos.sh: Remove _ob_local.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/metadata/proteanos.sh | 101 |
1 files changed, 40 insertions, 61 deletions
diff --git a/lib/metadata/proteanos.sh b/lib/metadata/proteanos.sh index c5774a5..493f30a 100644 --- a/lib/metadata/proteanos.sh +++ b/lib/metadata/proteanos.sh @@ -30,122 +30,107 @@ _OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'$' _ob_validate_source_name_proteanos() { - _ob_local _obvsnpro_name + local name= - _obvsnpro_name="${1}" + name="${1}" - if echo "${_obvsnpro_name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ + if echo "${name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ >/dev/null 2>&1; then - case "${_obvsnpro_name}" in + case "${name}" in src-*) - _ob_return 1 - return ${?} + return 1 ;; esac else - _ob_return 1 - return ${?} + return 1 fi - _ob_return 0 - return ${?} + return 0 } _ob_validate_binary_name_proteanos() { - _ob_local _obvbnpro_name + local name= - _obvbnpro_name="${1}" + name="${1}" - if echo "${_obvbnpro_name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ + if echo "${name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ >/dev/null 2>&1; then - case "${_obvbnpro_name}" in + case "${name}" in src-*) - _ob_return 1 - return ${?} + return 1 ;; esac else - _ob_return 1 - return ${?} + return 1 fi - _ob_return 0 - return ${?} + return 0 } _ob_validate_version_proteanos() { - _ob_local _obvvpro_version + local version= - _obvvpro_version="${1}" + version="${1}" - echo "${_obvvpro_version}" | grep -E "${_OB_VERSION_RE_PROTEANOS}" \ + echo "${version}" | grep -E "${_OB_VERSION_RE_PROTEANOS}" \ >/dev/null 2>&1 - _ob_return ${?} return ${?} } _ob_get_upstreamver_proteanos() { - _ob_local _obguvpro_version + local version= - _obguvpro_version="${1}" + version="${1}" - echo "${_obguvpro_version%-*}" + echo "${version%-*}" - _ob_return 0 - return ${?} + return 0 } _ob_get_distrev_proteanos() { - _ob_local _obgdrpro_version + local version= - _obgdrpro_version="${1}" + version="${1}" - echo "${_obgdrpro_version##*-}" + echo "${version##*-}" - _ob_return 0 - return ${?} + return 0 } _ob_get_system_arch_proteanos() { - _ob_local - cat '@@SYSCONFDIR@@/proteanos_arch' - _ob_return 0 - return ${?} + return 0 } _ob_get_system_plat_proteanos() { - _ob_local - cat '@@SYSCONFDIR@@/proteanos_plat' - _ob_return 0 - return ${?} + return 0 } _ob_get_system_path_proteanos() { - _ob_local _obgsppro_path_id _obgsppro_pkgver + local path_id= + local pkgver= - _obgsppro_path_id="${1}" + path_id="${1}" shift 1 - case "${_obgsppro_path_id}" in + case "${path_id}" in 'package-source') # source version if [ ${#} -eq 2 ]; then printf '/usr/src/%s_%s' "${1}" "${2}" else - _ob_return 125 - return ${?} + return 125 fi ;; 'package-docs') @@ -153,8 +138,7 @@ _ob_get_system_path_proteanos() if [ ${#} -eq 2 ]; then printf '/usr/share/doc/%s' "${1}" else - _ob_return 125 - return ${?} + return 125 fi ;; 'buildflags') @@ -162,20 +146,18 @@ _ob_get_system_path_proteanos() if [ ${#} -eq 1 ]; then printf '@@DATADIR@@/opkbuild/buildflags/%s' "${1}" else - _ob_return 125 - return ${?} + return 125 fi ;; 'platconf') # source version plat if [ ${#} -eq 3 ]; then - ob_parse_version -u '_obgsppro_pkgver' "${2}" + ob_parse_version -u 'pkgver' "${2}" printf '@@DATADIR@@/platconf/%s/%s\n' "${3}" "${1}" printf '@@DATADIR@@/platconf/%s/%s_%s\n' "${3}" "${1}" \ - "${_obgsppro_pkgver}" + "${pkgver}" else - _ob_return 125 - return ${?} + return 125 fi ;; 'build-helper') @@ -186,17 +168,14 @@ _ob_get_system_path_proteanos() printf '%s' '@@OPKHELPER_3_0@@' ;; *) - _ob_return 1 - return ${?} + return 1 ;; esac else - _ob_return 125 - return ${?} + return 125 fi ;; esac - _ob_return 0 - return ${?} + return 0 } |