install.sh
changeset 167 37c65411b411
child 168 8505cc1ad3ce
equal deleted inserted replaced
166:29b19a90ff3f 167:37c65411b411
       
     1 #!/bin/sh
       
     2 
       
     3 #------------------------------------------------------------------------------
       
     4 #
       
     5 #  EtherCAT install script
       
     6 #
       
     7 #  $Id$
       
     8 #
       
     9 #------------------------------------------------------------------------------
       
    10 
       
    11 # Fetch parameter
       
    12 
       
    13 if [ $# -eq 0 ]; then
       
    14     echo "Usage: $0 <INSTALLDIR>"
       
    15     exit 1
       
    16 fi
       
    17 
       
    18 INSTALLDIR=$1
       
    19 
       
    20 # Create install directory
       
    21 
       
    22 if [ ! -d $INSTALLDIR ]; then
       
    23     echo "Creating directory $INSTALLDIR..."
       
    24     if ! mkdir $INSTALLDIR; then exit 1; fi
       
    25 fi
       
    26 
       
    27 # Copy files
       
    28 
       
    29 if ! cp master/ec_master.ko   $INSTALLDIR; then exit -1; fi
       
    30 if ! cp devices/ec_8139too.ko $INSTALLDIR; then exit -1; fi
       
    31 
       
    32 # Finished
       
    33 
       
    34 exit 0
       
    35 
       
    36 #------------------------------------------------------------------------------