#!/bin/sh
# ####################################################################
# Exceed Connection Server 13.7
# Copyright (c) 1997-2009 Open Text Corporation. All Rights Reserved.
# ####################################################################
# makescripts
# $Revision: 14334 $
# ####################################################################

# create the shell scripts

Installpath=$1
Files="ecsstart ecsstop ecsinfo keymanager ecsbootstart ecsbootstop ecswall getversions setperms"
HeaderFile="sys/scriptHeader"

# create the common header
cat > $HeaderFile << EOF 
#!/bin/sh
#added by installer
Installpath=${Installpath}
EOF

for i in ${Files} ; do
	if [ -r $i ] ; then
	cp $HeaderFile ${i}.tmp
	sed "1,3 d" < $i >> ${i}.tmp
	rm -f $i ${i}.backup
	mv ${i}.tmp $i
		chmod 744 $i
		if [ "$i" = "ecsinfo" ]; then
			chmod go+x $i
		fi
	fi
done

rm ${HeaderFile}
