# HG changeset patch # User Pascal Bellard # Date 1468400210 -7200 # Node ID 3ecb0788b8ebfaaffe2670a5bd5d190fe0698722 # Parent 2d2d9b8b9c98bdcb148297e89ae155b5a5173b22 cooker.cgi: show previous logs diff -r 2d2d9b8b9c98 -r 3ecb0788b8eb web/cooker.cgi --- a/web/cooker.cgi Tue Jul 12 03:02:02 2016 +0300 +++ b/web/cooker.cgi Wed Jul 13 10:56:50 2016 +0200 @@ -344,7 +344,11 @@ syntax_highlighter log echo '' fi - echo '

Cook log

' + echo "

Cook log $(stat -c %y $log | sed 's/ .*//')

" + for i in $(ls -t $log.*); do + echo -n "" + echo "$(stat -c %y $i | sed 's/ .*//')" + done echo '
'
 			cat $log | syntax_highlighter log
 			echo '
' @@ -357,6 +361,15 @@ [ "$pkg" ] && echo "
No log: $pkg
" fi ;; + log=*) + log=${QUERY_STRING#log=} + if [ -s $log ]; then + echo "

Cook log $(stat -c %y $log | sed 's/ .*//')

" + echo '
'
+			cat $log | syntax_highlighter log
+			echo '
' + fi + ;; file=*) # Don't allow all files on the system for security reasons. file=${QUERY_STRING#file=}