chaostic
Group: Members
Posts: 328
Joined: Mar. 2005 |
|
Posted: May 17 2008,09:47 |
|
DSL 3.4.11, gnu-utils.dsl loaded.
When you do "man ls", it returns: This is not a BusyBox application. then it opens up the online netrik man page.
I thought it was an issue with the dsl man script, but it turns out that it is a symlink issue that confuses the man script. /bin/ls is symlinked to "busybox" while every other busybox app is symlinked to "/bin/busybox". The man script expects it to be /bin/busybox (or atleast, the second entry in a array to be busybox).
So, fix the symlink, or change the man script to check if it's a symlink to just "busybox" instead of only "/\/busybox/". I don't know enough perl (natch: or any :P) to offer my own fix.
But, since we are talking about the man script, how hard would it be to add two new flags to it? -o and -b.
-o would force it to check for the app online, even if its in bb, while -b would force to check the bb man page for it.
I'm thinking all it needs is:
Code Sample | # Force online if ( $app =~ /^-o$|^--online$/ ) { print "Forcing online man check...\n"; sleep 2; $app = $ARGV[1]; $grab = $MANUAL . $app . '§ion=all'; system("netrik \"$grab\" 2>/dev/null"); exit; }
# Force BB if ( $app =~ /^-b$|^--busybox$/ ) { print "Forcing BusyBox man check...\n"; sleep 2; $app = $ARGV[1]; $grab = 'http://www.busybox.net/downloads/BusyBox.html#item_' . $app; system("netrik \"$grab\" 2>/dev/null"); exit; }
|
This would be added after the check for -h/--help and before the actual busybox check.
Oh, and last small man related question, shouldn't there be a backdated copy of the busybox online man page that matches the options available for the v1.2.2 busybox that dsl uses, instead of the 1.10 that is current? Sure the changes arn't that big, but for consistency (and nitpickings :P) sake...
edit: A quick nano on a copy of the man script confirms that the -o and -b code works as expected.
Also, I found a nice Freebsd online man page that can be used by this script (I use OSX which uses freebsd tools that I need to check for), but I'll keep that to myself unless someone wants it (Cause why would dsl need to be able to get freebsd man pages? :P)
edit 2: I also finally got around to figuring out how to change the website used by the man script to the nicer linux.die.net man pages (It redirects http://linux.die.net/man/$app to http://linux.die.net/man/$n/$app depending on which man section the app belongs to, which prevented me from using it before.) Pm if you want it, or ask and I'll add the change (or change if using a flag).
|