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

case ${1} in

	--help | -h | "")
		bsng-help -a "Christopher Roy Bratusek" -e "nano@jpberlin.de" -h "http://www.nanolx.org/"\
			-l "GNU GPL v3" -n "check_opt" -s "check for dependency or exit" -v "${BSNG_VERSION}" -y "${BSNG_YEAR}"\
			-o "application:|application to check for"\
			-o "script:|script requiring the application"
	;;

	* )
		which "${1}" &>/dev/null
		[[ $? != 0 ]] && (
			echo -e "${1} not found! ${@:2} won't work without it."
			exit 1 )
	;;

esac
