add motd generator script
[freebsd-maintainer-scripts/.git] / getprs
CommitLineData
efd73192
SB
1#!/bin/sh
2
3: {USER:="sbz"}
4
5SCRIPT=${0##*/}
6SCRIPT_VERSION="1.0"
7
8PR_SUMMARY_URL="http://www.freebsd.org/cgi/query-pr-summary.cgi?responsible=${USER}"
9
10format_line() {
11 sed -n "s#^<tr class='o'><td>o</td><td>\([^<]*\)</td><td><a href='/cgi/query-pr.cgi?pr=[^']*'>\([^<]*\)</a></td><td>[^<]*</td><td>\([^<]*\)</td></tr>#\1 | \2 | \3#p"
12}
13
14fetch_prs() {
15 HTTP_USER_AGENT="${SCRIPT}/${SCRIPT_VERSION}" fetch -q -o - ${PR_SUMMARY_URL} 2>&1 | format_line
16}
17
18fetch_prs