slitaz-base-files rev 245 5.6.2

man: we dont need retawq for slitaz doc and read online man
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 01 08:32:54 2014 +0200 (2014-05-01)
parents 698757a3847e
children 720c56ccca14
files rootfs/usr/bin/man
line diff
     1.1 --- a/rootfs/usr/bin/man	Wed Apr 30 13:55:46 2014 +0200
     1.2 +++ b/rootfs/usr/bin/man	Thu May 01 08:32:54 2014 +0200
     1.3 @@ -10,11 +10,13 @@
     1.4  . /etc/locale.conf
     1.5  export TEXTDOMAIN LANG
     1.6  
     1.7 -if [ ! -x /usr/bin/retawq ]; then
     1.8 -	echo; _ "Missing Retawq web browser..."
     1.9 -	_ "Please run: su -c 'tazpkg get-install retawq'"
    1.10 -	exit 0
    1.11 -fi
    1.12 +check_retawq() {
    1.13 +	if [ ! -x /usr/bin/retawq ]; then
    1.14 +		echo; _ "Missing Retawq web browser..."
    1.15 +		_ "Please run: su -c 'tazpkg get-install retawq'"
    1.16 +		exit 0
    1.17 +	fi
    1.18 +}
    1.19  
    1.20  local i
    1.21  local SECTION
    1.22 @@ -41,13 +43,13 @@
    1.23  
    1.24  TOPIC=$1
    1.25  
    1.26 -if [ -x /usr/bin/retawq -a -f /usr/share/doc/$TOPIC/$TOPIC.html ]; then
    1.27 +if [ check_retawq -a -f /usr/share/doc/$TOPIC/$TOPIC.html ]; then
    1.28  	retawq --dump=file:///usr/share/doc/$TOPIC/$TOPIC.html | less -M
    1.29  	return
    1.30 -elif [ -x /usr/bin/retawq -a -f /usr/share/doc/slitaz/$TOPIC.html ]; then
    1.31 +elif [ check_retawq -a -f /usr/share/doc/slitaz/$TOPIC.html ]; then
    1.32  	retawq --dump=file:///usr/share/doc/slitaz/$TOPIC.html | less -M
    1.33  	return
    1.34 -elif [ -x /usr/bin/retawq -a -f /usr/share/doc/slitaz-tools/$TOPIC.html ]; then
    1.35 +elif [ check_retawq -a -f /usr/share/doc/slitaz-tools/$TOPIC.html ]; then
    1.36  	retawq --dump=file:///usr/share/doc/slitaz-tools/$TOPIC.html | less -M
    1.37  	return
    1.38  elif [ -f /usr/share/doc/slitaz/$TOPIC.txt ]; then
    1.39 @@ -67,7 +69,7 @@
    1.40  		fi
    1.41  		return
    1.42  	fi
    1.43 -	if [ -x /usr/bin/retawq -a -f $i/$TOPIC.html ]; then
    1.44 +	if [ check_retawq -a -f $i/$TOPIC.html ]; then
    1.45  		retawq --dump=file://$i/$TOPIC.html | less -M
    1.46  		return
    1.47  	fi