#!/bin/sh SITE="http://www.freshports.org" : ${PAGER:=more} _error() { echo "===>>> No valid port directory given" 2> /dev/null exit 1 } [ -z "$1" ] && _error port="$1" page="`fetch -o - -q "$SITE/$port" 2> /dev/null`" || _error echo "$page" | awk ' BEGIN { print "===>>> Gathering commit history for '"$port"'" } /Number of commits found.*cellpadding="[0-9]+">$/, /Number of commits found.*p>$/ { print } ' | sed -E '{ 4,5 d $ d /]*>/=================>>>\ / s/<[^>]+>//g / / s/  />> / / / s/^ *([^ ]+) /Committer: \1@FreeBSD.org/ /"/ s/"/"/g / / s/ / /g /</ s/<//g /&/ s/&/\&/g s/^ +// s/ +$// 2 s/([^)]+\)?).*/ ===>>> \1/ 3 s/.*// }' | sed '$ d' | sed '$ d' | "$PAGER"