Add documentation to Be menu

Similar to the way you can add access to mounted disk volumes to the Be menu, you can also add quick access to Be’s provided documentation by typing:
ln -s /boot/beos/documentation ~/config/be
But this means you also get all the empty files, pictures, and other cruft that lives under /boot/beos/documentation. Here’s a script that will create appropriate documentation links, preserve the directory structure, and display only HTML documentation files in the Be menu.

DOC="Documentation"
IFS="
"
cd ~/config/be
[ -d ${DOC} ] && rm -rf ${DOC}
mkdir ${DOC}
cd ${DOC}
for x in `find /boot/beos/documentation ( -name "*html" -o -type d ) -print |
 sort -f | sed -e s/"/boot/beos/documentation/"//g`
do
echo "linking to ${x}"
[ -d /boot/beos/documentation/${x} ] && mkdir -p ${x}
[ -f /boot/beos/documentation/${x} ] && ln -s "/boot/beos/documentation/${x}"
 "./${x}"
done
rmdir `find . -type d -empty -print`

Hope this helps somebody out there. If you can tell me how to do this with a query, that would be great.

 

Comments

No comments so far.

(comments are closed)

Kategorien

 
 
Blogroll
Resources