diff --git a/common/hooks/post-install/02-remove-libtool-archives.sh b/common/hooks/post-install/02-remove-libtool-archives.sh index 099a18fddb..bffe02c090 100644 --- a/common/hooks/post-install/02-remove-libtool-archives.sh +++ b/common/hooks/post-install/02-remove-libtool-archives.sh @@ -1,7 +1,7 @@ # This hook removes libtool archives (.la) unless $keep_libtool_archives is set. hook() { - if [ -z "$keep_libtool_archives" ]; then + if [ -z "$keep_libtool_archives" -a -d "${PKGDESTDIR}" ]; then find ${PKGDESTDIR} -type f -name *.la -delete fi }