#!/usr/bin/env bash

#These are global functions to include in all /usr/local/bin/cluster/* scripts
#mReschke 2012-04-03

DEFAULT="\033[0;0m"
BLUE="\033[0;34m"
GREEN="\033[0;32m"
CYAN="\033[0;36m"
RED="\033[0;31m"
PURPLE="\033[0;35m"
BROWN="\033[0;33m"
LIGHTGRAY="\033[0;37m"

DARKGRAY="\033[1;30m"
LIGHTBLUE="\033[1;34m"
LIGHTGREEN="\033[1;32m"
LIGHTCYAN="\033[1;36m"
LIGHTRED="\033[1;31m"
LIGHTPURPLE="\033[1;35m"
YELLOW="\033[1;33m"
WHITE="\033[1;37m"


function clearscreen () {
	clear
	#printf "\033[1;34m"
	#printf " ------------------------------------------------------------------\n"
	#printf "| Dynatron cluster Framework                           2012-04-03  |\n"
	#printf "| http://mreschke.com/topic/290                                    |\n"
	#printf " ------------------------------------------------------------------\n"
	#printf "\033[1;37m"
	echo -e "${GREEN} Dynatron Cluster Framework ${BROWN}|"
	echo -e "${GREEN}    mReschke  2012-04-03    ${BROWN}|"
	echo -e "${BROWN}----------------------------"
}

function header() {
	echo -e "${BROWN}:: ${LIGHTGREEN}$1${DEFAULT}"
}

function line() {
	echo -e "   ${GREEN}* ${WHITE}$1${DEFAULT}"
}

function error() {
	echo
	echo -e "${LIGHTRED}ERROR: ${RED}$1${DEFAULT}"
	echo
}

function notice() {
	echo
	echo -e "${YELLOW}NOTICE: ${LIGHTGRAY}$1${DEFAULT}"
}

function message() {
	echo
	echo -e "${PURPLE}MESSAGE:\n${DEFAULT}$1"
}
