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

Add 'mybugs' plugin with user profile support
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 20:51:46 2017 +0100 (2017-02-22)
parents
children b4700d7f9d42
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/user.conf" ] && . $plugins/mybugs/user.conf
9 echo "<h3>My bugs</h3>"
10 echo "<pre>"
11 for bug in $(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')
12 do
13 . ${bug}
14 id=$(basename $(dirname $bug))
15 cat << EOT
16 <img src='images/bug.png' alt='' /> \
17 Bug $id: <a href="?id=$id">$BUG</a> <span class="date">- $DATE</span>
18 EOT
19 done
20 echo "</pre>"