From fef3f4af90c5d49844116c31ebb664920d1e1656 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 14 Apr 2009 14:27:51 -0500 Subject: Cleanup some of the DB addition code Signed-off-by: Aaron Griffin --- makechrootpkg | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'makechrootpkg') diff --git a/makechrootpkg b/makechrootpkg index 69f9cff..536c4e2 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -223,15 +223,16 @@ chmod +x "$uniondir/chrootbuild" if mkarchroot -r "/chrootbuild" "$uniondir"; then source ${WORKDIR}/PKGBUILD - if [ -n "$add_to_db" ]; then + pkgfile=${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz + + if [ -n "$add_to_db" -a -e "$pkgfile" ]; then [ -d "${chrootdir}/union/repo" ] || mkdir -p "${chrootdir}/union/repo" pushd "${chrootdir}/union/repo" >/dev/null - cp ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz . - repo-add repo.db.tar.gz *.pkg.tar.gz + cp "$pkgfile" . + repo-add repo.db.tar.gz "${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz" popd >/dev/null fi - pkgfile=${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz if [ -e "$pkgfile" ]; then if [ -n "$PKGDEST" ]; then echo "Moving completed package file to ${PKGDEST}" -- cgit v1.2.3-70-g09d2