cookutils diff web/cooker.cgi @ rev 517

Merge default.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Jul 29 03:27:59 2012 +0000 (2012-07-29)
parents 4b1f207c4058 b3b8e39cccf5
children bb0473ed32d5
line diff
     1.1 --- a/web/cooker.cgi	Wed Jun 20 23:17:27 2012 +0000
     1.2 +++ b/web/cooker.cgi	Sun Jul 29 03:27:59 2012 +0000
     1.3 @@ -64,8 +64,8 @@
     1.4  				-e s"#^Executing:\([^']*\).#<span class='sh-val'>\0</span>#"g \
     1.5  				-e s"#^====\([^']*\).#<span class='span-line'>\0</span>#"g \
     1.6  				-e s"#^[a-zA-Z0-9]\([^']*\) :: #<span class='span-sky'>\0</span>#"g \
     1.7 -				-e s"#ftp://\([^']*\).*#<a href='\0'>\0</a>#"g	\
     1.8 -				-e s"#http://\([^']*\).*#<a href='\0'>\0</a>#"g ;;
     1.9 +				-e s"#ftp://[^ '\"]*#<a href='\0'>\0</a>#"g	\
    1.10 +				-e s"#http://[^ '\"]*#<a href='\0'>\0</a>#"g ;;
    1.11  		receipt)
    1.12  			sed -e s'|&|\&amp;|g' -e 's|<|\&lt;|g' -e 's|>|\&gt;|'g \
    1.13  				-e s"#^\#\([^']*\)#<span class='sh-comment'>\0</span>#"g \
    1.14 @@ -258,10 +258,20 @@
    1.15  					echo "<pre>No log file: $log</pre>"
    1.16  				fi ;;
    1.17  		esac ;;
    1.18 +	stuff=*)
    1.19 +		file=${QUERY_STRING#stuff=}
    1.20 +		echo "<h2>$file</h2>"
    1.21 +		echo '<pre>'
    1.22 +		cat $wok/$file
    1.23 +		echo '</pre>' ;;
    1.24  	receipt=*)
    1.25  		pkg=${QUERY_STRING#receipt=}
    1.26  		echo "<h2>Receipt for: $pkg</h2>"
    1.27  		if [ -f "$WOK/$pkg/receipt" ]; then
    1.28 +			( cd $wok/$pkg ; find stuff -type f 2> /dev/null ) | \
    1.29 +			while read file ; do
    1.30 +				echo "<a href=\"?stuff=$pkg/$file\">$file</a>"
    1.31 +			done
    1.32  			echo '<pre>'
    1.33  			cat $WOK/$pkg/receipt | syntax_highlighter receipt
    1.34  			echo '</pre>'