This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH] dodoc: install directories recursively
- From: "Yaakov (Cygwin/X)" <yselkowitz at users dot sourceforge dot net>
- To: cygwin-apps at cygwin dot com
- Date: Sun, 1 Apr 2012 02:41:04 -0500
- Subject: [PATCH] dodoc: install directories recursively
- References: <4F720F3C.4040501@cornell.edu>
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