diff options
Diffstat (limited to 'db-functions')
-rw-r--r-- | db-functions | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db-functions b/db-functions index a2e2f72..c105dab 100644 --- a/db-functions +++ b/db-functions @@ -66,6 +66,17 @@ getpkgname() { echo ${tmp%-*-*} } +# Get the pkgver-pkgrel of this package +getpkgver() { + local tmp + + tmp=${1##*/} + tmp=${tmp%$PKGEXT} + tmp=${tmp%$SRCEXT} + tmp=${tmp%-$CARCH} + echo $tmp | sed 's|.*-\(.*-.*\)$|\1|g' +} + check_pkg_arch () { #check_pkg_arch pkgfile arch local arch _arch="$(/usr/bin/bsdtar -xOf "$1" .PKGINFO | /bin/grep "^arch" | /bin/sed 's|\w*\s*=\s*\(.*\)|\1|')" |