From d4f00819ac9cb8f5463c1f13e524d24e848b2683 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 2 May 2010 15:42:29 +0200 Subject: copy namcap.log to working dir --- makechrootpkg | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/makechrootpkg b/makechrootpkg index 9daeb89..779786e 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -198,7 +198,7 @@ cd /build export HOME=/build sudo -u nobody makepkg $MAKEPKG_ARGS || touch BUILD_FAILED [ -f BUILD_FAILED ] && exit 1 -which namcap &>/dev/null && namcap /build/PKGBUILD /pkgdest/*.pkg.tar.* > /pkgdest/namcap.log +which namcap &>/dev/null && namcap /build/PKGBUILD /pkgdest/*.pkg.tar.* > /build/namcap.log exit 0 EOF ) > "$copydir/chrootbuild" @@ -207,12 +207,11 @@ chmod +x "$copydir/chrootbuild" if mkarchroot -r "/chrootbuild" "$copydir"; then for pkgfile in "${copydir}"/pkgdest/*.pkg.tar.*; do [ -e "$pkgfile" ] || continue - _pkgname=$(basename "$pkgfile") if [ "$add_to_db" -eq "1" ]; then - [ -d "${copydir}/repo" ] || mkdir -p "${copydir}/repo" + mkdir -p "${copydir}/repo" pushd "${copydir}/repo" >/dev/null cp "$pkgfile" . - repo-add repo.db.tar.gz "$_pkgname" + repo-add repo.db.tar.gz "$(basename "$pkgfile")" popd >/dev/null fi @@ -223,7 +222,7 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then fi done - for l in "${copydir}"/build/*-{build,package}.log; do + for l in "${copydir}"/build/{namcap,*-{build,package}}.log; do [ -f "$l" ] && mv "$l" "${WORKDIR}" done else -- cgit v1.2.3-70-g09d2