#!/bin/bash -e # # Simple script verifies data can be accessed via McIDAS ADDE servers on the SDI. # The script creates a temporary directory to store all the McIDAS Files necessary # to run an IMGLIST command. A temporary directory is used so not to mess up a user # that currently runs McIDAS. The temporary directory is removed at the end of the. # script. if [ $# -eq 0 ] ; then echo "SDI Server IP must be entered" exit fi SDI_SERVER_IP=$1 export SDI_SERVER_IP export CORE_MCIDAS=/home/mcidas export CORE_DATA=$CORE_MCIDAS/data export CORE_BIN=$CORE_MCIDAS/bin export CORE_MCIDAS_EXE=$CORE_BIN/mcidas export USER_DATA=$HOME/sdi_test export MCPATH=$USER_DATA:$CORE_DATA export PATH=$CORE_BIN:$PATH # # Check to see if mcidas can be found # if ! [ -x "$CORE_MCIDAS_EXE" ] ; then echo "File '$CORE_MCIDAS_EXE' is not executable or found" exit 0 fi # # Check to see if users mcidas/data directory is available # if ! [ -d "$USER_DATA" ] ; then echo "Temporary data directory, $USER_DATA not found. Creating '$USER_DATA'" mkdir $USER_DATA fi echo "DATALOC ADD GOES16 $SDI_SERVER_IP" dataloc.k ADD GOES16 $SDI_SERVER_IP dsinfo.k I GOES16 echo "IMGLIST GOES16/CONUS" imglist.k GOES16/FD rm $USER_DATA/* rmdir $USER_DATA