cookutils diff web/cooker.cgi @ rev 835

cooker.cgi: add some doc links
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 14 09:12:09 2016 +0100 (2016-11-14)
parents 47e7b3037588
children cc73035433ab
line diff
     1.1 --- a/web/cooker.cgi	Tue Aug 09 12:19:49 2016 +0200
     1.2 +++ b/web/cooker.cgi	Mon Nov 14 09:12:09 2016 +0100
     1.3 @@ -304,13 +304,22 @@
     1.4  				fi
     1.5  			fi
     1.6  			[ -x ./man2html ] &&
     1.7 -			if [ -d $wok/$bpkg/install/usr/man -o -d $wok/$bpkg/install/usr/share/man ]; then
     1.8 +			if [ -d $wok/$bpkg/install/usr/man ] ||
     1.9 +			   [ -d $wok/$bpkg/install/usr/share/man ] ||
    1.10 +			   [ -d $wok/$bpkg/taz/*/fs/usr/man ] ||
    1.11 +			   [ -d $wok/$bpkg/taz/*/fs/usr/share/man ]; then
    1.12  				echo "<a href='?man=$bpkg'>man</a>"
    1.13  			fi
    1.14 -			if [ -d $wok/$bpkg/install/usr/doc -o -d $wok/$bpkg/install/usr/share/doc ]; then
    1.15 +			if [ -d $wok/$bpkg/install/usr/doc ] ||
    1.16 +			   [ -d $wok/$bpkg/install/usr/share/doc ] ||
    1.17 +			   [ -d $wok/$bpkg/taz/*/fs/usr/doc ] ||
    1.18 +			   [ -d $wok/$bpkg/taz/*/fs/usr/share/doc ]; then
    1.19  				echo "<a href='?doc=$bpkg'>doc</a>"
    1.20  			fi
    1.21 -			if [ -d $wok/$bpkg/install/usr/info -o -d $wok/$bpkg/install/usr/share/info ]; then
    1.22 +			if [ -d $wok/$bpkg/install/usr/info ] ||
    1.23 +			   [ -d $wok/$bpkg/install/usr/share/info ] ||
    1.24 +			   [ -d $wok/$bpkg/taz/*/fs/usr/info ] ||
    1.25 +			   [ -d $wok/$bpkg/taz/*/fs/usr/share/info ]; then
    1.26  				echo "<a href='?info=$bpkg'>info</a>"
    1.27  			fi
    1.28  			echo "<a href='ftp://${HTTP_HOST%:*}/$pkg/'>browse</a>"
    1.29 @@ -490,6 +499,8 @@
    1.30  		pkg=$(GET $type)
    1.31  		dir=$WOK/$pkg/install/usr/share/$type
    1.32  		[ -d $dir ] || dir=$WOK/$pkg/install/usr/$type
    1.33 +		[ -d $dir ] || dir=$(echo $WOK/$pkg/taz/*/fs/usr/share/$type)
    1.34 +		[ -d $dir ] || dir=$(echo $WOK/$pkg/taz/*/fs/usr/$type)
    1.35  		page=$(GET file)
    1.36  		if [ -z "$page" ]; then
    1.37  			page=$(find $dir -type f | sed q)