summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-02-13 21:09:46 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2009-02-13 21:09:46 +0100
commit277c01e56e42977c01a1fe709cfe2130bf177ac2 (patch)
tree7412093be67e7e91553cd33f8bdc37029bb32b83 /db-functions
parent767257f9802709ef7c5f516b29bb1f498bdcea78 (diff)
downloaddbscripts-277c01e56e42977c01a1fe709cfe2130bf177ac2.tar.gz
dbscripts-277c01e56e42977c01a1fe709cfe2130bf177ac2.tar.xz
Correct the sourceball removal step
Only remove sourceballs that do NOT exist in any repo This code is experimental Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions11
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|')"