#!/bin/sh

base=http://wiki.debian.org
path=$1
cdir=$2
file=copyright.manual
name=CopyRight
        
w3m $base/$path/$name > copyright.manual
sed -i -n -e '/Copyright and authors/,/CategoryPermalink/p' -e '/^ /d' $file
sed -i -e '/^ /d' -e'/\(Content\|CategoryPermalink\)/d' $file
sed -i -e '/^$/{;N;/^\n$/D;}' $file
sed -i -e "1iAbout $cdir:\n" $file
