#!/bin/sh
######################################

echo "installing $INSTALLTYPE part."

if [ "$INSTALLTYPE" = "BIN" ]; then

  chmod 755 $INSTALLDIR/.simplemake

  IDIR=$INSTALLDIR/.simplemake/makefiles
  if [ ! -d $IDIR ]; then
    mkdir $IDIR
  fi

  if [ -r $IDIR/Makefile.def ]; then
    chmod 755 $IDIR/Makefile.def
  fi
  cp ./makef.ins/empty.def $IDIR/Makefile.def

  if [ -r $IDIR/Makefile ]; then
    chmod 755 $IDIR/Makefile
  fi
  cp ./Makefile $IDIR/Makefile

  if [ -r $IDIR/Makefile.lsm ]; then
    chmod 755 $IDIR/Makefile.lsm
  fi
  cp ./Makefile.lsm $IDIR/Makefile.lsm

  DIR=`pwd | sed -e s%.*/%%`
  VERSION=$DIR

  chmod 555 $INSTALLDIR/.simplemake

else 
  echo "Nothing to install"
fi

