#!/bin/csh -f
#+
# OSIRIS library of scripts
#
# NAME
#      osirisScriptReply - set osiris.SCRIPTREPLY
#
# SYNOPSIS
#     osirisScriptReply
#
# DESCRIPTION
#
#     Popup prompt for observer when script times out.  
#     Typically called from osirisScriptReplyWrapper
#
# ARGUMENTS
#     none
#
# OPTIONS
#
# EXAMPLES
#    osirisScriptReply
#
# ENVIRONMENT VARIABLES
#
# FILES
#
# SERVERS & KEYWORDS
#    
#
#
# SCRIPTS CALLED
#
# EXIT STATUS
#     0 - normal exit, no error
#     1 - script aborted by an interrupt
#
#
#-
# MODIFICATION HISTORY
# 2021-04-26 jlyke  Orignal
#######################################

set scriptask = (`show -s osiris -terse scriptask`)
if ($#scriptask == 0) then
  set scriptask = "Timeout Detected"
endif

echo ""
echo "$scriptask"
echo ""
echo -n "Continue? [y/n]: "

set reply = $<

switch ($reply)
  # treat yes, true, non-zero as "y"
  case Y*:
  case y*:
  case T*:
  case t*:
  case [1-9]*:
    set scriptreply = y
    breaksw
  default:
    set scriptreply = n
    breaksw
endsw

modify -s osiris scriptreply = $scriptreply

exit

