#!/bin/sh # The contents of this file are subject to the Interbase Public # License Version 1.0 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy # of the License at http://www.Inprise.com/IPL.html # # Software distributed under the License is distributed on an # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express # or implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code was created by Inprise Corporation # and its predecessors. Portions created by Inprise Corporation are # Copyright (C) Inprise Corporation. # # All Rights Reserved. # Contributor(s): ______________________________________. # this script is to be used for creating a superserver kit. # # TIMESTAMP="199712010500.00" # Dec 01 1997, 5:00AM # Note: This date is used only for V5.0.0.627 TIMESTAMP="" tarname="" # tar file flag client_sw="" # 'client only' flag server_sw="" # 'client and server' flag TARFILE="interbase.tar" SUPERSERVER="SUPERSERVER" Msg1="Assuming Client and Server configuration." if [ $# -eq 0 ]; then Msg2="Default tar file name $TARFILE" else if [ $# -gt 2 ]; then echo "ERROR: too many parameters." echo "Usage: $0 [-c | -s] [TarFileName]" exit 1 fi for i in $1 $2 ; do case $i in -c | -C ) if [ ! -z "$server_sw" ]; then echo "ERROR: illegal switch combination." echo "Usage: $0 [-c | -s] [TarFileName]" exit 1 fi Msg1="Client Only configuration." SUPERSERVER="" client_sw="Yes";; -s | -S ) if [ ! -z "$client_sw" ]; then echo "ERROR: illegal switch combination." echo "Usage: $0 [-c | -s] [TarFileName]" exit 1 fi Msg1="Client and Server configuration." SUPERSERVER="SUPERSERVER" server_sw="Yes";; * ) if [ ! -z "$tarname" ]; then echo "ERROR: tar file name is already given: $TARFILE" exit 1 fi TARFILE="$i" tarname="Yes" Msg2="Tar file name $TARFILE";; esac done fi # copy the required file to mtar directory if [ -d mtar ]; then # mtar exists delete and remove directory rm -rf mtar fi echo "$Msg1" echo "$Msg2" if [ "$SUPERSERVER" ]; then if [ -f interbase/bin/ibserver ]; then # creating superserver tar file echo "Creating Client and Server archive" #create mtar and copy new stuff mkdir mtar mkdir mtar/interbase mkdir mtar/interbase/bin mkdir mtar/interbase/examples mkdir mtar/interbase/help mkdir mtar/interbase/include mkdir mtar/interbase/intl mkdir mtar/interbase/lib mkdir mtar/interbase/doc mkdir mtar/interbase/UDF cp interbase/bin/ibserver mtar/interbase/bin/ibserver cp interbase/bin/fred mtar/interbase/bin/fred cp interbase/bin/gbak mtar/interbase/bin/gbak cp interbase/bin/gdef mtar/interbase/bin/gdef cp interbase/bin/gds_lock_print mtar/interbase/bin/gds_lock_print cp interbase/bin/ibguard mtar/interbase/bin/ibguard cp interbase/bin/gfix mtar/interbase/bin/gfix cp interbase/bin/gpre mtar/interbase/bin/gpre cp interbase/bin/gsec mtar/interbase/bin/gsec cp interbase/bin/gsplit mtar/interbase/bin/gsplit cp interbase/bin/gstat mtar/interbase/bin/gstat cp interbase/bin/ibmgr.bin mtar/interbase/bin/ibmgr.bin cp interbase/bin/isc4.gbak mtar/interbase/bin/isc4.gbak cp interbase/bin/iblicense mtar/interbase/bin/iblicense cp interbase/bin/isql mtar/interbase/bin/isql cp interbase/bin/qli mtar/interbase/bin/qli cp interbase/examples/v5/* mtar/interbase/examples cp -r interbase/help mtar/interbase cp -r interbase/include mtar/interbase cp -r interbase/intl mtar/interbase cp -r interbase/UDF mtar/interbase cp interbase/interbase.msg mtar/interbase/interbase.msg cp interbase/isc4.gdb mtar/interbase/isc4.gdb cp interbase/isc_config mtar/interbase/isc_config cp interbase/isc_ins_hlp.dat mtar/interbase/isc_ins_hlp.dat cp interbase/license.txt mtar/interbase/license.txt cp interbase/ib_license.dat.client mtar/interbase/ib_license.dat cp interbase/doc/* mtar/interbase/doc cp interbase/install.ksh mtar/interbase/install.ksh cp interbase/install.txt mtar/interbase/install.txt # for SOLARIS if [ -f interbase/lib/gdsmt.so.1 ]; then cp interbase/lib/gdsmt.so.1 mtar/interbase/lib/gdsmt.so.0 ( cd mtar/interbase/lib; ln -s gdsmt.so.0 gds.so.0 ) TARFLAGS_CREATE="cvpf" TARFLAGS_VIEW="tvf" fi if [ -f interbase/lib/ib_util.so ]; then cp interbase/lib/ib_util.so mtar/interbase/lib/ fi # for HP-UX if [ -f interbase/lib/gds.sl.1 ]; then cp interbase/lib/gds.sl.1 mtar/interbase/lib/gds.sl TARFLAGS_CREATE="cvpf" TARFLAGS_VIEW="tvf" fi if [ -f interbase/lib/ib_util.sl ]; then cp interbase/lib/ib_util.sl mtar/interbase/lib/ fi cp interbase/lib/gds_pyxis.a mtar/interbase/lib/ cp interbase/lock_header_template mtar/interbase/lock_header_template cp interbase/services.isc mtar/interbase/services.isc cp interbase/Release_Notes.pdf mtar/interbase #finally cd to this directory cd mtar if [ "$TIMESTAMP" != "" ]; then ch -t $TIMESTAMP `find . -print` fi tar $TARFLAGS_CREATE $TARFILE \ interbase/bin \ interbase/doc \ interbase/examples \ interbase/help \ interbase/include \ interbase/install.ksh \ interbase/intl \ interbase/UDF \ interbase/interbase.msg \ interbase/isc4.gdb \ interbase/isc_config \ interbase/isc_ins_hlp.dat \ interbase/lib \ interbase/license.txt \ interbase/ib_license.dat \ interbase/lock_header_template \ interbase/services.isc \ interbase/Release_Notes.pdf tar $TARFLAGS_VIEW $TARFILE else echo "ERROR: This is not a super server kit!!" exit 1 fi else # creating client only tar file echo "Creating Client Only archive" #create mtar and copy new stuff mkdir mtar mkdir mtar/interbase mkdir mtar/interbase/bin mkdir mtar/interbase/examples mkdir mtar/interbase/include mkdir mtar/interbase/lib mkdir mtar/interbase/doc cp interbase/bin/gbak mtar/interbase/bin/gbak cp interbase/bin/gdef mtar/interbase/bin/gdef cp interbase/bin/gfix mtar/interbase/bin/gfix cp interbase/bin/gpre mtar/interbase/bin/gpre cp interbase/bin/iblicense mtar/interbase/bin/iblicense cp interbase/bin/isql mtar/interbase/bin/isql cp interbase/bin/qli mtar/interbase/bin/qli cp interbase/doc/* mtar/interbase/doc cp interbase/examples/v5/* mtar/interbase/examples rm -f mtar/interbase/examples/*.gdb cp -r interbase/include mtar/interbase cp interbase/interbase.msg mtar/interbase/interbase.msg cp interbase/install.ksh mtar/interbase/install.ksh # for SOLARIS if [ -f interbase/lib/gdsmt.so.1 ]; then cp interbase/lib/gdsmt.so.1 mtar/interbase/lib/gdsmt.so.0 ( cd mtar/interbase/lib; ln -s gdsmt.so.0 gds.so.0 ) TARFLAGS_CREATE="cvpf" TARFLAGS_VIEW="tvf" fi # for HP-UX if [ -f interbase/lib/gds.sl.1 ]; then cp interbase/lib/gds.sl.1 mtar/interbase/lib/gds.sl TARFLAGS_CREATE="cvpf" TARFLAGS_VIEW="tvf" fi cp interbase/license.txt mtar/interbase/license.txt cp interbase/install.txt mtar/interbase/install.txt #finally cd to this directory cd mtar if [ "$TIMESTAMP" != "" ]; then touch -t $TIMESTAMP `find . -print` fi tar $TARFLAGS_CREATE $TARFILE \ interbase/bin \ interbase/doc \ interbase/examples \ interbase/include \ interbase/install.ksh \ interbase/interbase.msg \ interbase/lib \ interbase/license.txt \ interbase/install.txt tar $TARFLAGS_VIEW $TARFILE fi #cd back to top level directory cd .. #move tar file mv mtar/$TARFILE $TARFILE if [ "$TIMESTAMP" != "" ]; then touch -t $TIMESTAMP $TARFILE else echo "We did NOT change the timestamp" fi #remove the maketar directory. rm -rf mtar