This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] dodoc: install directories recursively


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]