diff options
Diffstat (limited to 'db-functions')
-rw-r--r-- | db-functions | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/db-functions b/db-functions index df50f22..d688df6 100644 --- a/db-functions +++ b/db-functions @@ -170,4 +170,25 @@ chk_license() { return 1 } +pkgname_from_src() { + local tmp + tmp=${1##*/} + tmp=${tmp%$SRCEXT} + for a in ${ARCHES[@]}; do + tmp=${tmp%-$a} + done + tmp=${tmp%-any} + echo ${tmp%-*-*} +} + +pkgver_from_src() { + tmp=${1##*/} + tmp=${tmp%$SRCEXT} + for a in ${ARCHES[@]}; do + tmp=${tmp%-$a} + done + tmp=${tmp%-any} + echo $tmp | sed 's|.*-\(.*-.*\)$|\1|g' +} + # vim: set ts=4 sw=4 noet ft=sh: |