diff options
author | Eric BĂ©langer <snowmaniscool@gmail.com> | 2009-08-12 22:43:30 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-08-12 22:45:58 +0200 |
commit | b5955a0d59e745ded6b9c121afc1523167d8cd42 (patch) | |
tree | 2ed55e5fce11473386553002da48bf041387468b /makechrootpkg | |
parent | 47e7a3706b4d51a94d383724f349493dc2b47a11 (diff) | |
download | devtools-b5955a0d59e745ded6b9c121afc1523167d8cd42.tar.gz devtools-b5955a0d59e745ded6b9c121afc1523167d8cd42.tar.xz |
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-x | makechrootpkg | 39 |
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 |