xbps-src: when compressing info files, check if /usr/share/info exists.

This commit is contained in:
Juan RP 2011-06-24 21:36:13 +02:00
parent 0455c8342f
commit 8271950e94
1 changed files with 3 additions and 2 deletions

View File

@ -101,10 +101,11 @@ xbps_write_metadata_pkg_real()
# Find out if this package contains info files and compress
# all them with gzip.
#
if [ -f ${DESTDIR}/usr/share/info/dir ]; then
if [ -d ${DESTDIR}/usr/share/info ]; then
# Always remove this file if curpkg is not texinfo.
if [ "$pkgname" != "texinfo" ]; then
rm -f ${DESTDIR}/usr/share/info/dir
[ -f ${DESTDIR}/usr/share/info/dir ] && \
rm -f ${DESTDIR}/usr/share/info/dir
fi
# Add info-files trigger.
triggers="info-files $triggers"