Subversion Repositories factorylink.sapi

Rev

Blame | Last modification | View Log | Download

#!/bin/sh
#
# Copyright 1998 DeltaLink bv. All rights reserved
#
MODULE=SAPI_S7
module=sapi_s7

# Test existance of FLOPT environment variable
if [ ${FLINK:=null} = 'null' ]
then
   echo ''
   echo environment FLINK not set ???? 
   echo ''
   exit 1
fi

echo
grep '$VOLUME' $module.'$$$' | sed -e 's/$VOLUME =/Installing/'
grep 'Serial Number' 'opt/delta.opt' | sed -e 's/*/for/'

#
# Installe module files in FactoryLink system
#
flxinst .


#
# update the titles and ctlist files
#
echo Updating titles and ctlist files...

# Test if the SAPI_S7 task is present in the titles file
if grep SAPI_S7 $FLINK/ac/titles > /dev/null
then
  echo already exists > /dev/null
else
  echo 'sapi_s7.ac     SAPI_S7        DeltaLink Sapi_S7 Protocol Driver' >> $FLINK/ac/titles
fi

# Test if the sapi_s7 entry is present in the ctlist file
if grep sapi_s7 $FLINK/ctgen/ctlist > /dev/null 
then
  echo already exists > /dev/null
else
  echo 'sapi_s7: sapis7m sapis7x sapis7p sapis7d' >> $FLINK/ctgen/ctlist
fi

# Test existance of FLOPT environment variable
if [ ${FLOPT:=null} = 'null' ]
then
   echo ''
   echo environment FLOPT not set ???? 
   echo ''
   exit 1
fi

#
# Check if the DeltaLink option file exists
#
if [ ! -s $FLOPT/delta.opt ]
then
  cp opt/delta.opt $FLOPT/delta.opt
fi

inst_seq -M$MODULE -Sopt/delta.opt