makechrootpkg: Check for files before copying
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
9ec1e72e65
commit
bf48e3ad8f
|
@ -233,13 +233,19 @@ if mkarchroot -r "/chrootbuild" "$uniondir"; then
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local pkgfile=${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz
|
||||||
if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
|
if [ -z "$(mount | grep ${chrootdir}/union/pkgdest)" ]; then
|
||||||
|
if [ -e "$pkgfile" ]; then
|
||||||
echo "Moving completed package file to ${WORKDIR}"
|
echo "Moving completed package file to ${WORKDIR}"
|
||||||
mv ${chrootdir}/union/pkgdest/${pkgname}-${pkgver}-${pkgrel}-*.pkg.tar.gz ${WORKDIR}
|
mv "$pkgfile" "${WORKDIR}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
|
if [ -z "$(mount | grep ${chrootdir}/union/srcdest)" ]; then
|
||||||
echo "Moving downloaded source files to ${WORKDIR}"
|
for f in ${chrootdir}/union/srcdest/*; do
|
||||||
mv ${chrootdir}/union/srcdest/* ${WORKDIR}
|
[ -e "$f" ] || continue
|
||||||
|
echo "Moving downloaded source file ($(basename $f) to ${WORKDIR}"
|
||||||
|
mv "$f" "${WORKDIR}"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
#just in case. We returned 1, make sure we fail
|
#just in case. We returned 1, make sure we fail
|
||||||
|
|
Loading…
Reference in New Issue