tazbug annotate web/plugins/pkgs/pkgs.cgi @ rev 106

List last messages on main page
author Christophe Lincoln <pankso@slitaz.org>
date Fri Feb 10 19:24:09 2017 +0100 (2017-02-10)
parents bcaad2bc76c8
children
rev   line source
pankso@80 1 #!/bin/sh
pankso@80 2 #
pankso@106 3 # TazBug Plugin - Buggy packages plugins
pankso@80 4 #
pankso@80 5
pankso@81 6 if [ "$(GET packages)" ] || [ "$(GET pkg)" ]; then
pankso@80 7 d="Skel"
pankso@80 8 header
pankso@80 9 html_header
pankso@80 10 user_box
pankso@80 11 if [ "$(GET pkg)" ]; then
pankso@80 12 pkg=$(GET pkg)
pankso@80 13 echo "<h2>Bugs for: $pkg</h2>"
pankso@80 14 echo "<pre>"
pankso@80 15 for bug in $(fgrep -l "OPEN" $bugdir/*/bug.conf)
pankso@80 16 do
pankso@80 17 . ${bug}
pankso@80 18 if echo "$PKGS" | fgrep -q "$pkg"; then
pankso@80 19 dir=$(dirname $bug)
pankso@80 20 id=$(basename $dir)
pankso@80 21 echo "ID: $id <a href='$script?id=$id'>$BUG</a> \
pankso@80 22 <span class='date'>$DATE</span>"
pankso@80 23 fi
pankso@80 24 done
pankso@80 25 echo "</pre>"
pankso@80 26 else
pankso@80 27 # List all pkgs affected by a bug
pankso@80 28 echo "<h2>Buggy packages</h2>"
pankso@80 29 echo "<pre>"
pankso@80 30 for bug in $(fgrep -l "OPEN" $bugdir/*/bug.conf)
pankso@80 31 do
pankso@80 32 . ${bug}
pankso@80 33 pkgs="$pkgs $PKGS"
pankso@80 34 unset PKGS
pankso@80 35 done
pankso@80 36 for pkg in $pkgs; do
pankso@80 37 echo "<a href='?pkg=$pkg'>$pkg</a> "
pankso@80 38 done
pankso@80 39 echo "</pre>"
pankso@80 40 fi
pankso@80 41 html_footer
pankso@80 42 exit 0
pankso@80 43 fi