mirror of
https://github.com/jcwimer/kubernetes-ansible
synced 2026-03-24 16:44:44 +00:00
21 lines
383 B
Bash
21 lines
383 B
Bash
#!/bin/bash
|
|
|
|
red=`tput setaf 1`
|
|
green=`tput setaf 2`
|
|
reset=`tput sgr0`
|
|
#echo "${red}red text ${green}green text${reset}"
|
|
|
|
function testbash() {
|
|
local name="${1}"
|
|
shift
|
|
local command="${@}"
|
|
eval $command
|
|
local return=$?
|
|
if [[ ! $return -eq 0 ]]; then
|
|
echo "${red}FAILED: ${name}${reset}"
|
|
return 1
|
|
else
|
|
echo "${green}PASSED: $name${reset}"
|
|
return 0
|
|
fi
|
|
} |