nvidia_build.sh: exit when errors detected

This commit is contained in:
Joanna Rutkowska 2011-07-30 13:55:36 +02:00
parent 9c6a8f7140
commit 9cd53a392a

View File

@ -120,7 +120,8 @@ if ! rpm -q kernel-devel-$KERNEL_VER; then
exit 1
fi
rpmbuild -D "kernels $KERNEL_VER" --rebuild nvidia-kmod-*.src.rpm
rpmbuild -D "kernels $KERNEL_VER" --rebuild nvidia-kmod-*.src.rpm || exit 1
# Unfortunately --define _rpmdir doesn't work with --rebuild
RPMDIR=`rpm -E '%_rpmdir'`
mv $RPMDIR/$basearch/kmod-nvidia-$KERNEL_VER*rpm rpm/$basearch/
mv $RPMDIR/$basearch/kmod-nvidia-$KERNEL_VER*rpm rpm/$basearch/ || exit 1
echo Done.