#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright Christopher Bratusek			#
#							#
#########################################################

. gettext.sh
export TEXTDOMAIN="bashstyle-rc"

case ${1} in
	--help | -h)
		bashstyle-help -a "Christopher Roy Bratusek" -e "nano@jpberlin.de" -h "https://www.nanolx.org/"\
				-l "GNU GPL v3" -n "power" -s "$(eval_gettext "calculate powers of numbers")"\
				-v "${BSNG_VERSION}" -y "${BSNG_YEAR}"\
				-o "$(eval_gettext "number:|number to calculate power from")"\
				-o "$(eval_gettext "power:|(optional) power [or 2]")"
	;;

	* )
		if [ -n "${2}" ]; then
			echo "$1 ^ $2" | bc
		else	echo "$1 ^ 2" | bc
		fi
	;;
esac
