util-pkg: make sure post_build exits on error

This commit is contained in:
udeved 2017-02-21 23:35:44 +01:00
parent 1afd7b8715
commit 6a2bf5a515

View file

@ -246,6 +246,7 @@ sign_pkg(){
move_to_cache(){
local src="$1"
[[ -n $PKGDEST ]] && src="$PKGDEST/$1"
[[ ! -f $src ]] && die
msg2 "Moving [%s] -> [%s]" "${src##*/}" "${pkg_dir}"
mv $src ${pkg_dir}/
${sign} && sign_pkg "${src##*/}"
@ -299,10 +300,8 @@ chroot_init(){
build_pkg(){
setarch "${target_arch}" \
mkchrootpkg ${mkchrootpkg_args[*]} || return 1
if [ $? -eq 0 ]; then
mkchrootpkg ${mkchrootpkg_args[*]}
post_build
fi
}
make_pkg(){