# @(#) $Id: cfg2html,v 4.15 2010-11-02 21:28:25 ralproth Exp $
############################################################################
# This is a wrapper for cfg2html(-hpux).sh (shortcut) and can be
# customized to fit your needs.
#


# reset local language to "C" -> English, default catalog, rr-25032010
export LANG="C"
export LANG_ALL="C"
export LC_MESSAGE="C"

SCRIPT=""

case $(uname) in
HP-UX) 	SCRIPT="cfg2html_hpux.sh" ;;			## 31.03.2005
Linux)  SCRIPT="cfg2html-linux";;			## 08.06.2006
*)	echo "$0: Unsupported operating system!"; exit 2 ;;
esac

# fix by Gerrit Verdick, 15.12.2009
if [ "X$1" = "X-h" -o "X$1" = "X-?" ]
then
	echo "@(#) $Id: cfg2html,v 4.15 2010-11-02 21:28:25 ralproth Exp $"
	echo "This is a wrapper for $SCRIPT and adds additional options to the"
	echo "command line. Please execute $SCRIPT -h to obtain a short online help"
	exit 1
fi

# Maybe this redundant and we should use $OPTION=-x in the case statement above
case $(uname) in
HP-UX) 	${SCRIPT} ${*} -0 -o/tmp ;;			## 31.03.2005
Linux)  ${SCRIPT} ${*} -x -A -P  ;;		        ## 08.06.2006
*)	echo "$0: Unsupported operating system!"; exit 2 ;;
esac

RETCODE=$?

if [ $RETCODE -eq 0 ]
then
	# Customize this to fit your needs!
	######## mueller ############# #  16.03.2005, 09:49 modified by Ralph.Roth
	[ -x /usr/bin/xitd03wg ] && /usr/bin/xitd03wg /tmp/$(hostname)*{.err,.html,_xpinfo.txt}
	[ -x /usr/bin/xitd01wg ] && /usr/bin/xitd01wg /tmp/$(hostname)*{.err,.html,_xpinfo.txt}
else
	echo "Error ($0): Returncode=$RETCODE"
fi

exit $RETCODE
