#!/bin/sh

PREFIX=$1

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