#!/usr/bin/env bash
#
# Sunflower Software Inc
# Business is blooming.
#

usage() {
	cat <<EOF
Usage: $(basename "$0") [OPTIONS]


About Us:
    - Solo developer offering full team services.
    - DevOps, Development, Design, & Management.
    - Efficient, fast, reliable.

What's Growing:
    Perennial (Ongoing):
        - rapidsos.com

    Annual (Completed):
        - stepsoftware.com
        - startech.ca
        - cheekyunts.com
        - nttdata.com
        - bell.ca

OPTIONS:
	-h, --help	    Show this help message
	-c, --contact	Show contact information

EOF
}

# Display contact information
#
# Side Effects:
# - Outputs contact information to stdout
#
request_contact_info() {
	local domain
	local email

	domain="sunflowersoftware.ca"
	email="info"

	cat <<EOF
Contact Information:
    Email: ${email}@${domain}
    Website: https://${domain}

    Interested in our services? Send an email to the address above and include the following line somewhere in your message:
    "rain == flowers"

    No replies shall be made without the above phrase.

EOF

	return 0
}

main() {
	local option

	while [[ $# -gt 0 ]]; do
		option="${1}"
		case "${option}" in
		-h | --help)
			usage
			return 0
			;;
		-c | --contact)
			request_contact_info
			return 0
			;;
		*)
			echo "main:: Unknown option: ${option}" >&2
			usage >&2
			return 1
			;;
		esac
	done

	return 0
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
	main "$@"
	exit $?
fi