summaryrefslogtreecommitdiffstats
path: root/makechrootpkg
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-04-14 21:27:51 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-05-06 21:36:08 +0200
commitfef3f4af90c5d49844116c31ebb664920d1e1656 (patch)
tree60627535d43fd039dc40450f169403ae99816d59 /makechrootpkg
parent49947d8fb3d3ca91632457820b424bb2b412fac1 (diff)
downloaddevtools-fef3f4af90c5d49844116c31ebb664920d1e1656.tar.gz
devtools-fef3f4af90c5d49844116c31ebb664920d1e1656.tar.xz
Cleanup some of the DB addition code
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg9
1 files changed, 5 insertions, 4 deletions
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}"