#!/bin/sh
#
# ident "@(#)utrelease.sh	1.5	11/04/06 Oracle"
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
#
PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH
OPTSTR="PR"
PROGRAM_ID="$(basename $0)"
print_product_name=false
print_product_rel=false
no_options=true

Usage() {
  cat 1>&2 <<-ENDIT
	Usage: $PROGRAM_ID
	         Prints Sun Ray Software Product Name and Release Number
	ENDIT

  exit 1
}

while getopts $OPTSTR OPT
do 
    case $OPT in 
        P)   print_product_name=true; no_options=false;;
	R)   print_product_rel=true; no_options=false;; 
	# anything else is an illegal option - print Usage
	?)	Usage;;
    esac 
done 

if  $no_options; then
    echo "Sun Ray Software 5.2.1"
else 
    if $print_product_name; then
	echo "Sun Ray Software"
    fi
    if $print_product_rel; then
	echo "5.2.1"
    
    fi
fi

exit 0
