#! /bin/bash
# Load pgdocs preformatted documentation from upstream
if [ -n "$1" ]
then
	MIRROR=$1
else
	MIRROR=postgresql.rmplc.co.uk
fi

if [ ! -x /usr/bin/wget ]
then
	echo This script needs the wget package installed
	exit 1
fi

if [ -d debian -a `basename $PWD | cut -d - -f1` = pgdocs ]
then
	/usr/bin/wget -N -g on --reject .tar.gz ftp://${MIRROR}/pub/postgresql/doc/7.2/*
else
	echo This script expects to be run from the top-level directory of the
	echo pgdocs source package.
	exit 1
fi

