- 论坛徽章:
- 0
|
回复 24# Shell_HAT
#! /bin/bash
#*****************************************
#
# csh script used to run fakesat_menu
#
# D. W. Murphy Last changed: 25-May-1995
#
#*****************************************
#
# In order for fakesat to run correctly a
# few environmental variables need to be set.
# If you need to set an environmental variable
# un-comment out the appropriate # setenv line
# by removing the # and then set the variable
# as you wish.
#*****************************************
# PGPLOT_FONT
#*****************************************
# set PGPLOT_FONT to the pathname of grfont.dat,
# if required.
export PGPLOT_FONT=/usr/lib/pgplot/grfont.dat
# notes:
# For pre 5.0 versions of PGPLOT there is no
# to set PGPLOT_FONT if grfont.dat is in
# /usr/local/vlb/pgplot on SUN workstations
# For pre 5.0 versions of PGPLOT there is no
# to set PGPLOT_FONT if grfont.dat is in
# /usr/src/pgplot on HP workstations
#*****************************************
# PGPLOT_DIR
#*****************************************
# In 5.0 or higher versions of PGPLOT:
# The environmental variable PGPLOT_DIR is used to show the
# location of:
# (i) the pgxwin_server program, if this program is not
# in a directory in your path.
# and
# (ii) the PGPLOT library, if it is not in the library path
# specified by the environmental variable LD_LIBRARY_PATH.
# set PGPLOT_DIR, if required:
# export PGPLOT_DIR=<directory name>
#*****************************************
# PGPLOT_XW_CLICKLEFT
#*****************************************
# In pre 5.0 versions of PGPLOT:
# If PGPLOT_XW_CLICKLEFT is set to 1.
# X windows created by fakesat will
# not be destroyed until there is a
# click of the left hand mouse button
# in them:
# set PGPLOT_XW_CLICKLEFT here, if required:
export PGPLOT_XW_CLICKLEFT=1
#*****************************************
# PGPLOT_XW_WIDTH
#*****************************************
# In pre 5.0 versions of PGPLOT:
# PGPLOT_XW_WIDTH set the size of an X window
# created by fakesat and fakesat_menu relative
# to a default size:
# set PGPLOT_XW_WIDTH here, if required:
export PGPLOT_XW_WIDTH=0.8
#*****************************************
# End of Environmental Variables
#*****************************************
#*****************************************
# Running fakesat_menu via an XWindow
#*****************************************
# set menu_defaults = $1
# note: since -f is a csh file inquiry operator need
# to turn off this feature by creating the variable a
set a=a$1
# echo 'a is: ' $a
if [[ $a=="a-h" ]]; then
echo ' '
echo 'possible run options are:'
echo ' '
echo 'run : run fakesat_menu with simple menu'
echo 'run -h : help option'
echo 'run -s : run fakesat_menu with simple menu'
echo 'run -c : run fakesat_menu with complex menu'
echo 'run -f : re-initialize everything by running fakesat_init -f'
echo ' followed by run'
echo ' '
exit
fi
set menu=s
set menu_defaults=menu_defaults
if [[ ${#argv} == 1 ]]; then
set menu_defaults=$1
fi
if [[ $a == "a-f" ]]; then
echo 'run -f option: '
fakesat_init -f
set menu=s
set menu_defaults=menu_defaults
fi
if [[ $a == "a-s" ]]; then
echo 'run -s option: using simple menu'
set menu=s
set menu_defaults=menu_defaults
fi
if [[ $a == "a-c" ]]; then
echo 'run -c option: using complex menu'
set menu=c
set menu_defaults=menu_defaults
fi
if [[ ${#argv} == 2 ]]; then_
set menu_defaults=$2
fi
if [[ ! -e $menu_defaults ]]; then
echo ' '
echo '***************************************************'
echo ' ERROR in starting up fakesat_menu'
echo ' menu_defaults file: ' $menu_defaults ' does NOT exist'
echo '***************************************************'
echo ' '
exit
fi
fakesat_menu <<EOD
$menu_defaults
$menu
EOD
exit
|
|