equal
deleted
inserted
replaced
6 # |
6 # |
7 # $Id$ |
7 # $Id$ |
8 # |
8 # |
9 #------------------------------------------------------------------------------ |
9 #------------------------------------------------------------------------------ |
10 |
10 |
|
11 # install function |
|
12 |
|
13 install() |
|
14 { |
|
15 echo " installing $1" |
|
16 if ! cp $1 $INSTALLDIR; then exit 1; fi |
|
17 } |
|
18 |
|
19 #------------------------------------------------------------------------------ |
|
20 |
11 # Fetch parameter |
21 # Fetch parameter |
12 |
22 |
13 if [ $# -eq 0 ]; then |
23 if [ $# -eq 0 ]; then |
14 echo "Usage: $0 <INSTALLDIR>" |
24 echo "Usage: $0 <INSTALLDIR>" |
15 exit 1 |
25 exit 1 |
16 fi |
26 fi |
17 |
27 |
18 INSTALLDIR=$1 |
28 INSTALLDIR=$1 |
|
29 echo "EtherCAT installer. Target: $INSTALLDIR" |
19 |
30 |
20 # Create install directory |
31 # Create installation directory |
21 |
32 |
22 if [ ! -d $INSTALLDIR ]; then |
33 if [ ! -d $INSTALLDIR ]; then |
23 echo "Creating directory $INSTALLDIR..." |
34 echo " creating target directory." |
24 if ! mkdir $INSTALLDIR; then exit 1; fi |
35 if ! mkdir $INSTALLDIR; then exit 1; fi |
25 fi |
36 fi |
26 |
37 |
27 # Copy files |
38 # Copy files |
28 |
39 |
29 if ! cp master/ec_master.ko $INSTALLDIR; then exit -1; fi |
40 install master/ec_master.ko |
30 if ! cp devices/ec_8139too.ko $INSTALLDIR; then exit -1; fi |
41 install devices/ec_8139too.ko |
31 |
42 |
32 # Finished |
43 # Finished |
33 |
44 |
34 exit 0 |
45 exit 0 |
35 |
46 |