Add some POLDI stuff
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/ksh
|
#! /usr/bin/ksh
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# script for installing SICS software on to a system.
|
# 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
|
# This script installs SW into directories beyond your current directory
|
||||||
# So, on an instrument account it would be feasible to run this from the
|
# 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
|
# home directory. The script checks if we are at home, else it will print
|
||||||
@ -15,7 +15,11 @@
|
|||||||
# distribution area
|
# distribution area
|
||||||
# dmc - installs all files for running dmc
|
# dmc - installs all files for running dmc
|
||||||
# topsi - install all files for topsi
|
# topsi - install all files for topsi
|
||||||
|
# focus - install all files for focus
|
||||||
# sans - installs all files for sans
|
# 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
|
# doc - updates only the documentation
|
||||||
# exe - installs only new executables
|
# exe - installs only new executables
|
||||||
# debug - copies only the server to current directory
|
# debug - copies only the server to current directory
|
||||||
@ -23,29 +27,36 @@
|
|||||||
# the common program library.
|
# the common program library.
|
||||||
#
|
#
|
||||||
# Mark Koennecke, Juli 1998
|
# Mark Koennecke, Juli 1998
|
||||||
|
# DM. 7-Sep-2000. Add POLDI.
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
#=========================== data area ====================================
|
#=========================== 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="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 ========================================
|
#======================= Functions ========================================
|
||||||
#------------------ check if in home directory
|
#------------------ check if in home directory
|
||||||
checkhome() {
|
checkhome() {
|
||||||
if [ $HOME != $(pwd) ]; then
|
if [[ $HOME != $(pwd) ]] then
|
||||||
echo "You are not in your home directory."
|
echo "You are not in your home directory."
|
||||||
echo "This may cause a non standard SICS installation"
|
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
|
read answer
|
||||||
if [ \( $answer = Y \) -o \( $answer = y \) ]; then
|
if [[ ($answer = Y) || ($answer = y) ]] then
|
||||||
echo "OK, I start clobbering......"
|
echo "OK, you have been warned ..."
|
||||||
else
|
else
|
||||||
echo "Script aborting........."
|
echo "Script aborting ..."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -64,48 +75,49 @@ echo " distribution area (MK only)"
|
|||||||
echo "dmc - installs all files for running dmc"
|
echo "dmc - installs all files for running dmc"
|
||||||
echo "topsi - install all files for topsi"
|
echo "topsi - install all files for topsi"
|
||||||
echo "sans - installs all files for sans "
|
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 "doc - updates only the documentation"
|
||||||
echo "exe - installs only new executables"
|
echo "exe - installs only new executables"
|
||||||
echo "lib - copies new clients to common program area"
|
echo "lib - copies new clients to common program area"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Mark Koennecke, LNS, Juli 1998"
|
echo "Mark Koennecke, LNS, Juli-October 1998, March 2000"
|
||||||
}
|
}
|
||||||
#------------------ copy new executables
|
#------------------ copy new executables
|
||||||
copydev () {
|
copydev () {
|
||||||
echo "Copying new executable files from development area to distribution.."
|
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
|
for cl in $clients; do
|
||||||
cp $devdir/SicsClient/$cl $disdir/bin
|
cp $clientdir/$cl $disdir/gen
|
||||||
done
|
done
|
||||||
cp $devdir/replicator/replicator.jar $disdir/bin
|
|
||||||
}
|
}
|
||||||
#------------------ copy to common program area
|
#------------------ copy to common program area
|
||||||
copylib() {
|
copylib() {
|
||||||
echo "Copying new client files to common LNS program area"
|
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
|
#------------------ copy all new stuff
|
||||||
copydevfull () {
|
copydevfull () {
|
||||||
echo "Copying ALL files from development area to distribution.."
|
echo "Copying ALL files from development area to distribution.."
|
||||||
copydev
|
copydev
|
||||||
echo "Copying documentation"
|
echo "Copying documentation"
|
||||||
cp $devdir/user/*.htm $disdir/doc
|
cp $docmaster/user/*.htm $disdir/doc
|
||||||
cp $devdir/user/*.html $disdir/doc
|
cp $docmaster/user/*.html $disdir/doc
|
||||||
cp $devdir/user/*.ps $disdir/doc
|
cp $docmaster/user/*.ps $disdir/doc
|
||||||
cp $devdir/manager/*.htm $disdir/manager
|
cp $docmaster/manager/*.htm $disdir/manager
|
||||||
}
|
}
|
||||||
#------------------ copy only new executables
|
#------------------ copy only new executables
|
||||||
copyexe () {
|
copyexe () {
|
||||||
echo "Copying new executable files"
|
echo "Copying new executable files"
|
||||||
cp $disdir/bin/SICServer $disdir/bin/psish $disdir/bin/pish bin
|
miau.py ~lnslib/src/sics/gen/genlist.dat
|
||||||
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
|
|
||||||
}
|
}
|
||||||
#----------------- copy documentation
|
#----------------- copy documentation
|
||||||
copydoc () {
|
copydoc () {
|
||||||
@ -117,9 +129,7 @@ copydoc () {
|
|||||||
#----------------- DMC special files
|
#----------------- DMC special files
|
||||||
copydmc () {
|
copydmc () {
|
||||||
echo "Copying DMC special files"
|
echo "Copying DMC special files"
|
||||||
cp $disdir/bin/count.tcl $disdir/bin/init.tcl \
|
miau.py ~lnslib/src/sics/dmc/dmclist.dat
|
||||||
$disdir/bin/log.tcl $disdir/bin/xydialog.tcl $disdir/bin/CheckSICS bin
|
|
||||||
cp $disdir/bin/dmc/* bin
|
|
||||||
if [ -e data/DataNumber ]; then
|
if [ -e data/DataNumber ]; then
|
||||||
echo "DataNumber found, OK"
|
echo "DataNumber found, OK"
|
||||||
else
|
else
|
||||||
@ -131,9 +141,7 @@ copydmc () {
|
|||||||
#----------------- TOPSI special files
|
#----------------- TOPSI special files
|
||||||
copytopsi () {
|
copytopsi () {
|
||||||
echo "Copying TOPSI special files"
|
echo "Copying TOPSI special files"
|
||||||
cp $disdir/bin/count.tcl $disdir/bin/init.tcl \
|
miau.py ~lnslib/src/sics/topsi/topsilist.dat
|
||||||
$disdir/bin/log.tcl $disdir/bin/CheckSICS bin
|
|
||||||
cp $disdir/bin/topsi/* bin
|
|
||||||
if [ -e data/DataNumber ]; then
|
if [ -e data/DataNumber ]; then
|
||||||
echo "DataNumber found, OK"
|
echo "DataNumber found, OK"
|
||||||
else
|
else
|
||||||
@ -145,9 +153,67 @@ copytopsi () {
|
|||||||
#----------------- SANS special files
|
#----------------- SANS special files
|
||||||
copysans() {
|
copysans() {
|
||||||
echo "Copying SANS special files"
|
echo "Copying SANS special files"
|
||||||
cp $disdir/bin/count.tcl $disdir/bin/init.tcl \
|
miau.py ~lnslib/src/sics/sans/sanslist.dat
|
||||||
$disdir/bin/log.tcl $disdir/bin/CheckSICS bin
|
if [ -e data/DataNumber ]; then
|
||||||
cp $disdir/bin/sans/* bin
|
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
|
if [ -e data/DataNumber ]; then
|
||||||
echo "DataNumber found, OK"
|
echo "DataNumber found, OK"
|
||||||
else
|
else
|
||||||
@ -156,7 +222,6 @@ copysans() {
|
|||||||
fi
|
fi
|
||||||
echo "Done, configuration files may need editing"
|
echo "Done, configuration files may need editing"
|
||||||
}
|
}
|
||||||
|
|
||||||
#------------------ check SICS directories
|
#------------------ check SICS directories
|
||||||
checkdir() {
|
checkdir() {
|
||||||
echo "Checking directory structure, creating as needed"
|
echo "Checking directory structure, creating as needed"
|
||||||
@ -169,7 +234,12 @@ checkdir() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
#======================= End of Functions ====================================
|
||||||
|
#
|
||||||
#-------------- the case for checking the command parameter
|
#-------------- the case for checking the command parameter
|
||||||
|
|
||||||
|
printf "\n Starting `basename $0` ...\n\n"
|
||||||
|
|
||||||
case ${1-nix} in
|
case ${1-nix} in
|
||||||
dev)
|
dev)
|
||||||
copydev
|
copydev
|
||||||
@ -208,6 +278,41 @@ case ${1-nix} in
|
|||||||
copydoc
|
copydoc
|
||||||
copysans
|
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)
|
lib)
|
||||||
copylib
|
copylib
|
||||||
;;
|
;;
|
||||||
@ -218,4 +323,7 @@ case ${1-nix} in
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo "sicsinstall finished with more or less success"
|
|
||||||
|
printf "\n End of `basename $0`.\n\n"
|
||||||
|
|
||||||
|
#========================= End of sicsinstall ================================
|
||||||
|
Reference in New Issue
Block a user