#!/bin/bash
#
# (c) 2008,2009 Fabian Herschel
# GNU Public License. No warranty.
#
LIC=$(cat <<EOLIC
  wow: Tool to run cluster configuration or check commands
  Copyright (C) 2009  SUSE Linux Products GmbH, Nurmberg
  Author: Fabian herschel

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
EOLIC
)
# 

usage()
{
	echo "usage: $0 "'[ --help | --license ]'
	echo "usage: $0 "'SUBCOMMAND SUBCOMMAND_OPTIONS'
	echo "usage: $0 "'SUBCOMMAND --help'
	echo
	echo "valid SUBCOMMANDS are:"
	echo "  cc | clusterconfig "
	echo "  sc | saprecheck"
}

	case "$1" in
		-? | -h | --help ) usage
				exit 0
				;;
		--license )
			echo "$LIC"
				;;
		--* | -* )	
				echo "unknown option $1"
				usage
				exit 0
				;;
		cc | clusterconfig | clusterchange )
				subcmd="$1"
				shift 1
				whbcc --wow "wow $subcmd" $@
				;;
		sc | saprecheck )
				subcmd="$1"
				shift 1
				whbsaprecheck --wow "wow $subcmd" $@
				;;
		* )
				echo "unknown sub command $1"
				usage
				exit 0
				;;
	esac
