dot-files/scripts/function/display_fatal
Buddy Sandidge 4a47c0e8f4 Squashed 'gvm/' content from commit 23017d2c9
git-subtree-dir: gvm
git-subtree-split: 23017d2c98964d5178082340c69d63fd01512f5f
2014-08-05 21:18:26 -07:00

14 lines
206 B
Plaintext

display_fatal() {
which tput &> /dev/null
if [[ "$?" == "0" ]] && [[ "$TERM" == "xterm" ]]; then
tput sgr0
tput setaf 1
echo "ERROR: $1" >&2
tput sgr0
else
echo "ERROR: $1" >&2
fi
exit 1
}