#!/bin/sh

# Setup path in startup script
# Peter Guntert, 19-01-2001

dmode=755
xmode=755

libdir=`pwd | sed -e 's@^/tmp_mnt@@'`
tmp=setup$$

case $# in
0) bindir=$libdir;; 
1) bindir=$1
   if [ ! -d $1 ]; then mkdir -p $1; chmod $dmode $1; fi
   ;;
*) echo "Usage: setup [bindir]"; exit 2;;
esac

for i in cofima difima ancoma; do
  sed -e "s,COFIMALIB=.*,COFIMALIB=$libdir,g" $i > $tmp
  mv $tmp $bindir/$i
  chmod $xmode $bindir/$i
done
