# HG changeset patch # User Christophe Lincoln # Date 1398925974 -7200 # Node ID e970dc10e7e2522a564a96e845a24d88012e793f # Parent 698757a3847e5a32f216dd35b1243b4b172871f8 man: we dont need retawq for slitaz doc and read online man diff -r 698757a3847e -r e970dc10e7e2 rootfs/usr/bin/man --- a/rootfs/usr/bin/man Wed Apr 30 13:55:46 2014 +0200 +++ b/rootfs/usr/bin/man Thu May 01 08:32:54 2014 +0200 @@ -10,11 +10,13 @@ . /etc/locale.conf export TEXTDOMAIN LANG -if [ ! -x /usr/bin/retawq ]; then - echo; _ "Missing Retawq web browser..." - _ "Please run: su -c 'tazpkg get-install retawq'" - exit 0 -fi +check_retawq() { + if [ ! -x /usr/bin/retawq ]; then + echo; _ "Missing Retawq web browser..." + _ "Please run: su -c 'tazpkg get-install retawq'" + exit 0 + fi +} local i local SECTION @@ -41,13 +43,13 @@ TOPIC=$1 -if [ -x /usr/bin/retawq -a -f /usr/share/doc/$TOPIC/$TOPIC.html ]; then +if [ check_retawq -a -f /usr/share/doc/$TOPIC/$TOPIC.html ]; then retawq --dump=file:///usr/share/doc/$TOPIC/$TOPIC.html | less -M return -elif [ -x /usr/bin/retawq -a -f /usr/share/doc/slitaz/$TOPIC.html ]; then +elif [ check_retawq -a -f /usr/share/doc/slitaz/$TOPIC.html ]; then retawq --dump=file:///usr/share/doc/slitaz/$TOPIC.html | less -M return -elif [ -x /usr/bin/retawq -a -f /usr/share/doc/slitaz-tools/$TOPIC.html ]; then +elif [ check_retawq -a -f /usr/share/doc/slitaz-tools/$TOPIC.html ]; then retawq --dump=file:///usr/share/doc/slitaz-tools/$TOPIC.html | less -M return elif [ -f /usr/share/doc/slitaz/$TOPIC.txt ]; then @@ -67,7 +69,7 @@ fi return fi - if [ -x /usr/bin/retawq -a -f $i/$TOPIC.html ]; then + if [ check_retawq -a -f $i/$TOPIC.html ]; then retawq --dump=file://$i/$TOPIC.html | less -M return fi