diff options
author | Thomas Bächler <thomas@archlinux.org> | 2007-09-14 18:38:41 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2007-09-14 18:38:41 +0200 |
commit | a1d4355f6cae8275d4da6ee39f52095909cf11a0 (patch) | |
tree | 418cd69081e81ea1942df5bbb130eec96285d2f6 /db-inc | |
parent | ab3b5e0eac5c557843716ab44ba44e49603f5d65 (diff) | |
download | dbscripts-a1d4355f6cae8275d4da6ee39f52095909cf11a0.tar.gz dbscripts-a1d4355f6cae8275d4da6ee39f52095909cf11a0.tar.xz |
adjusted scripts for pacman 3 naming scheme, should still work with the old one
Diffstat (limited to 'db-inc')
-rw-r--r-- | db-inc | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -1,4 +1,4 @@ -# $Id: db-inc,v 1.6 2006/05/07 18:02:42 judd Exp $ +# $Id: db-inc,v 1.7 2007/09/14 16:38:41 thomas Exp $ [ "$UID" = "" ] && UID=`uid` TMPDIR="/tmp/archpkg.$arch.$repoid.$UID" @@ -16,6 +16,18 @@ if [ ! -d $stagedir ]; then exit 1 fi +# Get the package name from the filename +# hackish, but should work for now +getpkgname() { + local tmp + + tmp=${1##*/} + tmp=${tmp%.pkg.tar.gz} + tmp=${tmp%-i686} + tmp=${tmp%-x86_64} + echo ${tmp%-*-*} +} + cleanup() { rm -rf $TMPDIR # unlock @@ -134,7 +146,7 @@ if [ -d $stagedir/del -a "`ls $stagedir/del`" ]; then cd $stagedir/del ( for i in *.pkg.tar.gz; do - pkgname=${i%-*-*} + pkgname=$(getpkgname $i) echo $pkgname done ) | $ARCHDIR/pkgdb2-del $repoid $stagedir/del @@ -147,7 +159,7 @@ fi if [ "$updatelists" ]; then echo "==> Generating Text Package List..." >&2 cd $TMPDIR/$cvsmod - $ARCHDIR/genpkglist $ftppath + $ARCHDIR/genpkglist $ftppath $arch # hack -- only Current's packages.txt goes in a "setup" subdir if [ "$reponame" = "current" ]; then |