summaryrefslogtreecommitdiff
path: root/makechrootpkg
diff options
context:
space:
mode:
authorEric BĂ©langer <snowmaniscool@gmail.com>2009-08-12 13:43:30 -0700
committerAaron Griffin <aaronmgriffin@gmail.com>2009-08-12 13:45:58 -0700
commitb5955a0d59e745ded6b9c121afc1523167d8cd42 (patch)
tree2ed55e5fce11473386553002da48bf041387468b /makechrootpkg
parent47e7a3706b4d51a94d383724f349493dc2b47a11 (diff)
makechrootpkg: Support for split packages
Move all built packages in the PKGDEST or WORKDIR (pkgname is now an array). Additional fixes for * inside quotes Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg39
1 files changed, 21 insertions, 18 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 5f5fb88..7ac67d1 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -229,25 +229,28 @@ chmod +x "$uniondir/chrootbuild"
if mkarchroot -r "/chrootbuild" "$uniondir"; then
source ${WORKDIR}/PKGBUILD
- pkgfile=${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*${PKGEXT}
-
- 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 "$pkgfile" .
- repo-add repo.db.tar.${DB_COMPRESSION} "${pkgname}-${pkgver}-${pkgrel}-*${PKGEXT}"
- popd >/dev/null
- fi
+ for _pkgname in ${pkgname[@]}; do
+ pkgfile="${chrootdir}"/union/pkgdest/${_pkgname}-*${PKGEXT}
+
+ 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 "$pkgfile" .
+ repo-add repo.db.tar.${DB_COMPRESSION} ${_pkgname}-${pkgver}-${pkgrel}-*${PKGEXT}
+ popd >/dev/null
+ fi
+
+ if [ -e $pkgfile ]; then
+ if [ -n "$PKGDEST" ]; then
+ echo "Moving completed ${_pkgname} package file to ${PKGDEST}"
+ mv $pkgfile "${PKGDEST}"
+ else
+ echo "Moving completed ${_pkgname} package file to ${WORKDIR}"
+ mv $pkgfile "${WORKDIR}"
+ fi
+ fi
+ done
- if [ -e "$pkgfile" ]; then
- if [ -n "$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
for f in ${chrootdir}/union/srcdest/*; do
[ -e "$f" ] || continue
if [ -n "$SRCDEST" ]; then