cookutils diff lighttpd/index.cgi @ rev 1003

Properly handle EXTRAVERSION
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Nov 07 10:38:12 2017 +0200 (2017-11-07)
parents 8190be7ad294
children e8ed065cd3a2
line diff
     1.1 --- a/lighttpd/index.cgi	Mon Nov 06 02:53:05 2017 +0200
     1.2 +++ b/lighttpd/index.cgi	Tue Nov 07 10:38:12 2017 +0200
     1.3 @@ -684,13 +684,22 @@
     1.4  	echo '<div id="info">'
     1.5  	echo "<a class='button icon receipt$(active receipt stuff)' href='$base/$pkg/receipt'>receipt &amp; stuff</a>"
     1.6  
     1.7 +	# In the receipts $EXTRAVERSION is defined using $kvers, get it here [copy from 'cook' set_paths()]
     1.8 +	if [ -f "$wok/linux/receipt" ]; then
     1.9 +		kvers=$(. $wok/linux/receipt; echo $VERSION)
    1.10 +		kbasevers=$(echo $kvers | cut -d. -f1,2)
    1.11 +	elif [ -f "$INSTALLED/linux-api-headers/receipt" ]; then
    1.12 +		kvers=$(. $INSTALLED/linux-api-headers/receipt; echo $VERSION)
    1.13 +		kbasevers=$(echo $kvers | cut -d. -f1,2)
    1.14 +	fi
    1.15 +
    1.16  	unset WEB_SITE WANTED
    1.17  	. $wok/$pkg/receipt
    1.18  
    1.19  	[ -n "$WEB_SITE" ] &&
    1.20  		echo "<a class='button icon website' href='$WEB_SITE' target='_blank' rel='noopener noreferrer'>web site</a>"
    1.21  
    1.22 -	[ -f "$wok/$pkg/taz/$PACKAGE-$VERSION/receipt" ] &&
    1.23 +	[ -f "$wok/$pkg/taz/$PACKAGE-$VERSION$EXTRAVERSION/receipt" ] &&
    1.24  		echo "<a class='button icon files$(active files)' href='$base/$pkg/files'>files</a>"
    1.25  
    1.26  	[ -n "$(ls $wok/$pkg/description*.txt)" ] &&