From 7675ad750a575c854ffb033dc97c6174426f1a99 Mon Sep 17 00:00:00 2001 From: dtw Date: Sun, 8 Mar 2009 10:03:04 +0000 Subject: [PATCH 2/2] Added PKGDEST support --- makechrootpkg | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/makechrootpkg b/makechrootpkg index 2a4e10a..bb4277e 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -168,7 +168,7 @@ source $uniondir/etc/makepkg.conf # files end up where they're expected in the _real_ filesystem [ -d "$uniondir/srcdest" ] || mkdir "$uniondir/srcdest" [ -d "$uniondir/pkgdest" ] || mkdir "$uniondir/pkgdest" -[ ! -z "$PKGDEST" ] && mount --bind "$PKGDEST" "$uniondir/pkgdest" +#[ ! -z "$PKGDEST" ] && mount --bind "$PKGDEST" "$uniondir/pkgdest" #[ ! -z "$SRCDEST" ] && mount --bind "$SRCDEST" "$uniondir/srcdest" if ! grep "PKGDEST=/pkgdest" "$uniondir/etc/makepkg.conf" >/dev/null 2>&1; then @@ -242,8 +242,13 @@ if mkarchroot -r "/chrootbuild" "$uniondir"; then local pkgfile=${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then if [ -e "$pkgfile" ]; then - echo "Moving completed package file to ${WORKDIR}" - mv "$pkgfile" "${WORKDIR}" + if [ ! -z "$PKGDEST" ]; then + echo "Moving completed package file to ${PKGDEST}" + mv "$pkgfile" "${PKGDEST}" + else + echo "Moving completed package file to ${WORKDIR}" + mv "$pkgfile" "${WORKDIR}" + fi fi fi if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then -- 1.6.2