#!/bin/sh
#
# finds the location of some binaries and writes it to uback.conf
# $Version$

echo "patching ./etc/uback.conf.dist..."

tar=`which tar`
rm=`which rm`
sed=`which sed`
cat=`which cat`
date=`which date`
install=`which install`
du=`which du`
cut=`which cut`
ls=`which ls`
dbtool=`which dbtool`
touch=`which touch`
find=`which find`

cmd="sed 's#tar=#tar=\"$tar\"#' ./etc/uback.conf.dist | 
sed 's#sed=#sed=\"$sed\"#' | 
sed 's#rm=#rm=\"$rm\"#' | 
sed 's#cat=#cat=\"$cat\"#' | 
sed 's#date=#date=\"$date\"#' | 
sed 's#du=#du=\"$du\"#' | 
sed 's#install=#install=\"$install\"#' | 
sed 's#ls=#ls=\"$ls\"#' | 
sed 's#dbtool=#dbtool=\"$dbtool\"#' |
sed 's#find=#find=\"$find\"#' |
sed 's#touch=#touch=\"$touch\"#' |
sed 's#cut=#cut=\"$cut\"#' > ./etc/uback.conf";


eval $cmd

echo "./etc/uback.conf created."

echo "configure done. now run \"make install\""
