tazbug view web/plugins/mybugs/user.sh @ rev 141

Improve mybugs plugin
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 21:18:03 2017 +0100 (2017-02-22)
parents 49fa101e75f5
children 6d13228babae
line source
1 #!/bin/sh
2 #
3 # This script display bug for a given user. A copy is used on SCN to
4 # display user bugs on profile page with a custom config file to set
5 # $bugdir.
6 #
7 [ -f "$plugins/mybugs/bugdir.conf" ] && . $plugins/mybugs/bugdir.conf
8 [ "$(GET user)" ] && user="$(GET user)"
10 echo "<h3>My bugs</h3>"
11 echo "<pre>"
12 for bug in $(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')
13 do
14 . ${bug}
15 id=$(basename $(dirname $bug))
16 cat << EOT
17 <img src='images/bug.png' alt='' /> \
18 Bug $id: <a href="?id=$id">$BUG</a> <span class="date">- $DATE</span>
19 EOT
20 done
21 echo "</pre>"