#!/bin/sh # # This script displays bugs for a given user. A copy is used on SCN to # display user bugs on profile page with a custom config file to set # $bugdir. # [ -f "$plugins/mybugs/bugdir.conf" ] && . $plugins/mybugs/bugdir.conf [ "$(GET user)" ] && user="$(GET user)" url="http://bugs.slitaz.org/" if fgrep -q -l "CREATOR=\"$user\"" ${bugdir}/*/*/bug.conf; then show_more="0" echo "
"
for bug in $(fgrep -l "CREATOR=\"$user\"" ${bugdir}/*/*/bug.conf | \
xargs ls -lt | awk '{print $9}' | head -n 3)
do
. ${bug}
id=$(basename $(dirname $bug))
cat << EOT
\
Bug $id: $BUG - $DATE
EOT
done
echo "
"
fi
#if fgrep -q -l "USER=\"$user\"" ${bugdir}/*/*/msg.*; then
#show_more="0"
#echo ""
#for msg in $(fgrep -l "USER=\"$user\"" ${bugdir}/*/*/msg.* | \
#xargs ls -lt | awk '{print $9}' | head -n 4)
#do
#. ${msg}
#id=$(basename $(dirname $msg))
#msgid=$(echo $msg | cut -d "." -f 2)
#message="$(fgrep MSG= $msg | cut -d \" -f 2 | cut -c 1-40)"
#cat << EOT
# \
#Bug $id: $DATE \
#${message}...
#EOT
#done
#echo "
"
#fi
if [ "$show_more" ]; then
echo "" if [ "$HTTP_HOST" == "bugs.slitaz.org" ]; then echo "$(gettext 'View all my bugs and messages')" else echo "$(gettext 'View all my bugs and debug messages on:') " echo "bugs.slitaz.org" fi echo "
" fi