Demosthenex n00b
Joined: 11 Sep 2002 Posts: 14 Location: Houston, TX
|
Posted: Tue Oct 01, 2002 8:30 pm Post subject: Man page installation in ebuilds with doman problem |
|
|
Installing man pages with doman fails to work properly when the man page has more than 1 period in the file name.
For example:
conserver.cf.1 fails to install.
In fact, seems any man file with multiple extensions fails.
I've looked at the doman script, and perhaps it needs a more resilient way to detect what man[0-9] directory a file belongs in.
Perhaps something like:
man_number = `basename conserver.cf.1 .gz`
man_number = ${man_number#${man_number/%[0-9]}}
This always returns the final digit of the filename, with basename removing any .gz extension.
Comments?
Demo
Here's a quick diff on doman that seems to work for me. I don't much like calling out to basename, perhaps someone else can suggest something.
+ diff -Naru doman~ doman
--- doman~ Thu Aug 29 11:27:25 2002
+++ doman Tue Oct 1 16:40:50 2002
@@ -25,9 +25,9 @@
fi
for x in "$@"
do
- md=${x#*.}
- suf=${x##*.}
- mandir=man${md:0:1}
+ md=`basename ${x} .gz`
+ mandir=man${x#${x/%[0-9]}}
+ suf=`basename ${md} .${mandir}`
if [ -e ${x} ]
then
if [ ! -d ${D}${myloc}${myext}/man/${mandir} ] |
|