makepkg: abort if we can't add install/changelog to package

This commit is contained in:
Dave Reisner 2014-08-21 10:42:10 -04:00 committed by Allan McRae
parent 235562a85e
commit cb9489119e
1 changed files with 4 additions and 1 deletions

View File

@ -2118,7 +2118,10 @@ create_package() {
if [[ -n ${!orig} ]]; then
msg2 "$(gettext "Adding %s file...")" "$orig"
cp "$startdir/${!orig}" "$dest"
if ! cp "$startdir/${!orig}" "$dest"; then
error "$(gettext "Failed to add %s file to package.")" "$orig"
exit 1
fi
chmod 644 "$dest"
comp_files+=("$dest")
fi