#!/bin/sh

PREFIX=$1

cd $PREFIX/archie-1.3.2
if [ $PWD != $PREFIX/archie-1.3.2 ]; then
	echo "Bailing... directory $PREFIX/archie-1.3.2 does not exist!"
	exit 1
fi
touch .$$bogus
if [ ! -f .$$bogus ]; then
	echo "Bailing... directory $PREFIX/archie-1.3.2 not writeable!"
	exit 1
fi
rm -f .$$bogus
echo "Configuring archie-1.3.2 for prefix ${PREFIX%%/src*}"
sed "s^@@@prefix@@@^${PREFIX%%/src*}^" < Makefile.rpp > Makefile
