cookutils diff lighttpd/index.cgi @ rev 1012
Separate modules/precheck from cook (next will be modules/getsrc); cook: fix bug preventing meta-packages to be included in receipt v2; lighttpd/index.cgi: show cooker state in the title (web browser show special icon if background page title has changed).
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 24 14:39:52 2017 +0200 (2017-11-24) |
parents | 46fe75e9b709 |
children | f6c47e5f4a8e |
line diff
1.1 --- a/lighttpd/index.cgi Wed Nov 22 20:06:06 2017 +0200 1.2 +++ b/lighttpd/index.cgi Fri Nov 24 14:39:52 2017 +0200 1.3 @@ -78,19 +78,26 @@ 1.4 # HTML page header 1.5 1.6 page_header() { 1.7 - local theme t='' css 1.8 + local theme t='' css pretitle='' cmd 1.9 theme=$(COOKIE theme) 1.10 [ "$theme" == 'default' ] && theme='' 1.11 [ -n "$theme" ] && theme="-$theme" 1.12 css="cooker$theme.css" 1.13 1.14 + if [ -n "$pkg" ]; then 1.15 + pretitle="$pkg - " 1.16 + else 1.17 + cmd="$(cat $command)" 1.18 + [ -n "$cmd" ] && pretitle="$cmd - " 1.19 + fi 1.20 + 1.21 echo -e 'Content-Type: text/html; charset=UTF-8\n' 1.22 1.23 cat <<EOT 1.24 <!DOCTYPE html> 1.25 <html lang="en"> 1.26 <head> 1.27 - <title>$([ -n "$pkg" ] && echo "$pkg - ")$title</title> 1.28 + <title>$pretitle$title</title> 1.29 <link rel="stylesheet" href="/$css"> 1.30 <link rel="icon" type="image/png" href="/slitaz-cooker.png"> 1.31 <link rel="search" href="$base/os.xml" title="$title" type="application/opensearchdescription+xml">