Better installer script
authorFlorian Pose <fp@igh-essen.com>
Fri, 07 Apr 2006 08:29:19 +0000
changeset 168 8505cc1ad3ce
parent 167 37c65411b411
child 169 b3ecbec2c487
Better installer script
install.sh
--- a/install.sh	Fri Apr 07 08:22:48 2006 +0000
+++ b/install.sh	Fri Apr 07 08:29:19 2006 +0000
@@ -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 @@
 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