Better installer script

This commit is contained in:
Florian Pose 2006-04-07 08:29:19 +00:00
parent 5e2fd32a02
commit d738fd9f46
1 changed files with 15 additions and 4 deletions

View File

@ -8,6 +8,16 @@
#
#------------------------------------------------------------------------------
# install function
install()
{
echo " installing $1"
if ! cp $1 $INSTALLDIR; then exit 1; fi
}
#------------------------------------------------------------------------------
# Fetch parameter
if [ $# -eq 0 ]; then
@ -16,18 +26,19 @@ if [ $# -eq 0 ]; then
fi
INSTALLDIR=$1
echo "EtherCAT installer. Target: $INSTALLDIR"
# Create install directory
# Create installation directory
if [ ! -d $INSTALLDIR ]; then
echo "Creating directory $INSTALLDIR..."
echo " creating target directory."
if ! mkdir $INSTALLDIR; then exit 1; fi
fi
# Copy files
if ! cp master/ec_master.ko $INSTALLDIR; then exit -1; fi
if ! cp devices/ec_8139too.ko $INSTALLDIR; then exit -1; fi
install master/ec_master.ko
install devices/ec_8139too.ko
# Finished