#!/bin/bash
#
#
#    Scalix Public License
#
#
#    The contents of this file are subject to the Scalix Public License
#    Version 1.1 ("License"); you may not use this file except in
#    compliance with the License. You may obtain a copy of the License at
#
# 
#    http://www.scalix.com/community/licensing 
#
# 
#    Software distributed under the License is distributed on an "AS IS"
#    basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
#    the License for the specific language governing rights and limitations
#    under the License.
#
# 
#    The Original Code is Scalix Server. 
#    The Initial Developer of the Original Code is Scalix Corporation. 
#    Copyright (C) 2006 Scalix Corporation. 
#    All Rights Reserved.
#    Additional Copyrights may apply - see the notice in each file
#
#
#
#
#
#
# Copyright (C) 2006 Scalix Corporation.  All Rights Reserved.
#

help() {
	echo ""
	echo ""
	echo "VERSION:" 
	echo "1.0"
	echo ""
	echo "NAME:" 
	echo "Show Buletin Board"
	echo ""
	echo "DESCRIPTION:"
	echo ""
	echo "omshowbb shows details about a Bulletin Board."
	echo ""
	echo "PARAMETERS:"
        echo "-B	AbsRef		number	single	The absolute reference number of the Bulletin Board.  To<br>list the absolute reference number of a Bulletin  Board,<br>use the -b option with the command omlistbbs."
        echo "-n	Number		number	single	The  temporary  reference  number of the Bulletin Board.<br>To list the temporary reference  number  of  a  Bulletin<br>Board, use the command omlistbbs."
        echo "-m	Match		string	single	The  subject,  within quotes, of the Bulletin Board.  To<br>specify a nested Bulletin Board,  give  a  hierarchy  of<br>Bulletin  Board  subjects,  delimiting the subjects with<br>angle brackets (>).  To list the  subjects  of  Bulletin<br>Boards, use the command omlistbbs."
        echo "-d	Depth		number	single	The  depth of the Bulletin Board.  The depth is the number<br>of levels the Bulletin Board  is  nested  under  the<br>Bulletin Board area.<br><br>Required  with  the -B and -n options unless a top-level<br>Bulletin Board is specified.<br><br>The depth must be the same as that used when the  reference<br>number was obtained using the command omlistbbs."
        echo ""
	echo "--help	Help	\"\"	\"\"	\"\"	Usage Information"
	echo ""
	echo "OUTPUT:"
	echo ""
	echo "text/plain"
}
#
# main script
#

declare params;
params="";
while [ "$1" != "" ]; do
	case "$1" in
		--help) help;
                        exit 0
			shift;;
		*) params="$params $1 $2";
                   shift;;
	esac
	shift
done
/opt/scalix/bin/omshowbb $params
exit 0
