hooks/post-install/create-xbps-metadata-scripts: make sure to finalize scripts correctly.

The issue was that if a pkg does not add the missing newline at INSTALL
or REMOVE scripts, those were generated with a syntax error.

Found by onekk.
This commit is contained in:
Juan RP 2014-04-14 10:41:06 +02:00
parent 3f568e88c2
commit 9df1aa3b4e

View file

@ -302,6 +302,7 @@ _EOF
found=1
cat ${action_file} >> $tmpf
fi
echo >> $tmpf
echo "exit 0" >> $tmpf
mv $tmpf ${PKGDESTDIR}/INSTALL && chmod 755 ${PKGDESTDIR}/INSTALL
;;
@ -311,6 +312,7 @@ _EOF
found=1
cat ${action_file} >> $tmpf
fi
echo >> $tmpf
echo "exit 0" >> $tmpf
mv $tmpf ${PKGDESTDIR}/REMOVE && chmod 755 ${PKGDESTDIR}/REMOVE
;;