Add some POLDI stuff

This commit is contained in:
cvs
2000-10-24 08:35:50 +00:00
parent 90e8c10c76
commit b1036fdde7

View File

@ -1,7 +1,7 @@
#!/usr/bin/ksh
#! /usr/bin/ksh
#----------------------------------------------------------------------------
# script for installing SICS software on to a system.
# The source of the data muste be visible to the filesystem.
# The source of the data must be visible to the filesystem.
# This script installs SW into directories beyond your current directory
# So, on an instrument account it would be feasible to run this from the
# home directory. The script checks if we are at home, else it will print
@ -15,7 +15,11 @@
# distribution area
# dmc - installs all files for running dmc
# topsi - install all files for topsi
# focus - install all files for focus
# sans - installs all files for sans
# trics - installs all files for TRICS
# hrpt - installs all files for HRPT
# poldi - installs all files for POLDI
# doc - updates only the documentation
# exe - installs only new executables
# debug - copies only the server to current directory
@ -23,32 +27,39 @@
# the common program library.
#
# Mark Koennecke, Juli 1998
# DM. 7-Sep-2000. Add POLDI.
#----------------------------------------------------------------------------
#=========================== data area ====================================
devdir=/data/koenneck/src/sics # development directory
devdir=~koenneck # development directory
disdir=/data/lnslib/src/sics # distribution directory
disdir=~lnslib/src/sics # distribution directory
dirdir="bin data doc log" # SICS directories
dirdir="bin data doc log motor" # SICS directories
bindir=/data/lnslib/bin # common directory for binaries
bindir=~lnslib/bin # common directory for binaries
clients="sicsclient.jar powderstatus.jar sansstatus.jar topsistatus.jar"
clients="$clients varwatcher.jar focusstatus.jar nndb.jar amor.jar fsync.jar"
clientdir=~koenneck/bin/sics
# directory where the client jar files live
docmaster=~koenneck/src/sics/doc # where the docs reside
#======================= Functions ========================================
#------------------ check if in home directory
checkhome() {
if [ $HOME != $(pwd) ]; then
if [[ $HOME != $(pwd) ]] then
echo "You are not in your home directory."
echo "This may cause a non standard SICS installation"
echo "Do you want me to continue(Y,y) or abort(any other character)"
printf "Do you want me to continue (Y,y) or abort (any other character): "
read answer
if [ \( $answer = Y \) -o \( $answer = y \) ]; then
echo "OK, I start clobbering......"
if [[ ($answer = Y) || ($answer = y) ]] then
echo "OK, you have been warned ..."
else
echo "Script aborting........."
echo "Script aborting ..."
exit 0
fi
fi
fi
}
#------------------- print usage
@ -64,48 +75,49 @@ echo " distribution area (MK only)"
echo "dmc - installs all files for running dmc"
echo "topsi - install all files for topsi"
echo "sans - installs all files for sans "
echo "trics - installs all files for trics "
echo "hrpt - installs all files for hrpt "
echo "amor - installs all files for amor"
echo "focus - installs all files for focus"
echo "poldi - installs all files for poldi"
echo "doc - updates only the documentation"
echo "exe - installs only new executables"
echo "lib - copies new clients to common program area"
echo ""
echo "Mark Koennecke, LNS, Juli 1998"
echo "Mark Koennecke, LNS, Juli-October 1998, March 2000"
}
#------------------ copy new executables
copydev () {
echo "Copying new executable files from development area to distribution.."
cp $devdir/SICServer $devdir/psish/psish $devdir/psish/pish $disdir/bin
cp $devdir/bin/sics/* $disdir/gen
for cl in $clients; do
cp $devdir/SicsClient/$cl $disdir/bin
cp $clientdir/$cl $disdir/gen
done
cp $devdir/replicator/replicator.jar $disdir/bin
}
#------------------ copy to common program area
copylib() {
echo "Copying new client files to common LNS program area"
cp $disdir/bin/*.jar $bindir
cp $disdir/gen/* $bindir
rm $bindir/SICServer
rm $bindir/TecsServer
# this is to overwrite the client start shell scripts with ones that point
# to lnslib
cp $disdir/bin/lib/* $bindir
}
#------------------ copy all new stuff
copydevfull () {
echo "Copying ALL files from development area to distribution.."
copydev
echo "Copying documentation"
cp $devdir/user/*.htm $disdir/doc
cp $devdir/user/*.html $disdir/doc
cp $devdir/user/*.ps $disdir/doc
cp $devdir/manager/*.htm $disdir/manager
cp $docmaster/user/*.htm $disdir/doc
cp $docmaster/user/*.html $disdir/doc
cp $docmaster/user/*.ps $disdir/doc
cp $docmaster/manager/*.htm $disdir/manager
}
#------------------ copy only new executables
copyexe () {
echo "Copying new executable files"
cp $disdir/bin/SICServer $disdir/bin/psish $disdir/bin/pish bin
for cl in $clients; do
cp $disdir/bin/$cl bin
done
cp $disdir/bin/sics bin
cp $disdir/bin/powderstatus bin
cp $disdir/bin/sansstatus bin
cp $disdir/bin/topsistatus bin
cp $disdir/bin/replicator.jar
miau.py ~lnslib/src/sics/gen/genlist.dat
}
#----------------- copy documentation
copydoc () {
@ -117,9 +129,7 @@ copydoc () {
#----------------- DMC special files
copydmc () {
echo "Copying DMC special files"
cp $disdir/bin/count.tcl $disdir/bin/init.tcl \
$disdir/bin/log.tcl $disdir/bin/xydialog.tcl $disdir/bin/CheckSICS bin
cp $disdir/bin/dmc/* bin
miau.py ~lnslib/src/sics/dmc/dmclist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
@ -131,9 +141,7 @@ copydmc () {
#----------------- TOPSI special files
copytopsi () {
echo "Copying TOPSI special files"
cp $disdir/bin/count.tcl $disdir/bin/init.tcl \
$disdir/bin/log.tcl $disdir/bin/CheckSICS bin
cp $disdir/bin/topsi/* bin
miau.py ~lnslib/src/sics/topsi/topsilist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
@ -145,9 +153,67 @@ copytopsi () {
#----------------- SANS special files
copysans() {
echo "Copying SANS special files"
cp $disdir/bin/count.tcl $disdir/bin/init.tcl \
$disdir/bin/log.tcl $disdir/bin/CheckSICS bin
cp $disdir/bin/sans/* bin
miau.py ~lnslib/src/sics/sans/sanslist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
echo "WARNING: Creating new DataNumber file with 0, adjust as needed"
echo " 0" > data/DataNumber
fi
echo "Done, configuration files may need editing"
}
#----------------- TRICS special files
copytrics() {
echo "Copying TRICS special files"
miau.py ~lnslib/src/sics/trics/tricslist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
echo "WARNING: Creating new DataNumber file with 0, adjust as needed"
echo " 0" > data/DataNumber
fi
echo "Done, configuration files may need editing"
}
#----------------- HRPT special files
copyhrpt() {
echo "Copying HRPT special files"
miau.py ~lnslib/src/sics/hrpt/hrptlist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
echo "WARNING: Creating new DataNumber file with 0, adjust as needed"
echo " 0" > data/DataNumber
fi
echo "Done, configuration files may need editing"
}
#----------------- FOCUS special files
copyfocus() {
echo "Copying FOCUS special files"
miau.py ~lnslib/src/sics/focus/focuslist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
echo "WARNING: Creating new DataNumber file with 0, adjust as needed"
echo " 0" > data/DataNumber
fi
echo "Done, configuration files may need editing"
}
#----------------- AMOR special files
copyamor() {
echo "Copying AMOR special files"
miau.py ~lnslib/src/sics/amor/amorlist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
echo "WARNING: Creating new DataNumber file with 0, adjust as needed"
echo " 0" > data/DataNumber
fi
echo "Done, configuration files may need editing"
}
#----------------- POLDI special files
copypoldi() {
echo "Copying POLDI special files"
miau.py ~lnslib/src/sics/poldi/poldilist.dat
if [ -e data/DataNumber ]; then
echo "DataNumber found, OK"
else
@ -156,7 +222,6 @@ copysans() {
fi
echo "Done, configuration files may need editing"
}
#------------------ check SICS directories
checkdir() {
echo "Checking directory structure, creating as needed"
@ -169,8 +234,13 @@ checkdir() {
fi
done
}
#======================= End of Functions ====================================
#
#-------------- the case for checking the command parameter
case ${1-nix} in
printf "\n Starting `basename $0` ...\n\n"
case ${1-nix} in
dev)
copydev
;;
@ -208,6 +278,41 @@ case ${1-nix} in
copydoc
copysans
;;
trics)
checkhome
checkdir
copyexe
copydoc
copytrics
;;
hrpt)
checkhome
checkdir
copyexe
copydoc
copyhrpt
;;
amor)
checkhome
checkdir
copyexe
copydoc
copyamor
;;
focus)
checkhome
checkdir
copyexe
copydoc
copyfocus
;;
poldi)
checkhome
checkdir
copyexe
copydoc
copypoldi
;;
lib)
copylib
;;
@ -217,5 +322,8 @@ case ${1-nix} in
*)
usage
;;
esac
echo "sicsinstall finished with more or less success"
esac
printf "\n End of `basename $0`.\n\n"
#========================= End of sicsinstall ================================