#!/bin/sh

if [ ! -f "mindi" ] ; then
    echo "Please 'cd' to the directory you have just untarred." >> /dev/stderr
    exit 1
fi
mkdir -p /usr/local/share/mindi
mkdir -p /usr/local/sbin
cp --parents -rdf * /usr/local/share/mindi/
ln -sf /usr/local/share/mindi/mindi /usr/local/sbin/
ls /etc/mindi/* &> /dev/null
[ "$?" -ne "0" ] && rm -Rf /etc/mindi
