[PATCH] dodoc: install directories recursively
Yaakov (Cygwin/X)
yselkowitz@users.sourceforge.net
Sun Apr 1 07:41:00 GMT 2012
From: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
---
lib/src_install.cygpart | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
Does this work for you?
diff --git a/lib/src_install.cygpart b/lib/src_install.cygpart
index 9165f11..aada741 100644
--- a/lib/src_install.cygpart
+++ b/lib/src_install.cygpart
@@ -153,10 +153,12 @@ docinto() {
# SYNOPSIS
# dodoc FILE [FILE] ...
# DESCRIPTION
-# Installs the given files into $D/usr/share/doc/PN/, or a subdirectory thereof
-# specified by the previous call to docinto.
+# Installs the given files or directories into $D/usr/share/doc/PN/, or a
+# subdirectory thereof specified by the previous call to docinto.
#****
dodoc() {
+ local docdir d f i
+
case "${_docinto_dir}" in
'') docdir=/usr/share/doc/${PN} ;;
/*) docdir=/usr/share/doc${_docinto_dir} ;;
@@ -167,7 +169,17 @@ dodoc() {
for i
do
- if [ -f ${i} -o -L ${i} ]
+ if [ -d ${i} ]
+ then
+ d=${i%/}
+ pushd ${d}/..
+ dodir ${docdir}/$(find ${d##*/} -type d)
+ for f in $(find ${d##*/} ! -type d)
+ do
+ __doinstall 0644 ${f} ${docdir}/${f%/*} || error "dodoc -r ${d} failed"
+ done
+ popd
+ elif [ -f ${i} -o -L ${i} ]
then
if [ "x$(file -b ${i})" != "xempty" -a ! -f ${D}${docdir}/${i} ]
then
--
1.7.9
More information about the Cygwin-apps
mailing list