lazy.sh: support non-terminal outputs

This commit is contained in:
Christian Schwarz 2017-11-18 17:02:43 +01:00
parent b4b1bebb5c
commit bc4b129536

View File

@ -1,8 +1,13 @@
#!/bin/sh
set -e
bold=$(tput bold)
normal=$(tput sgr0)
if [ ! -z "$TERM" ]; then
bold=$(tput bold)
normal=$(tput sgr0)
else
bold=""
normal=""
fi
step() {
echo "${bold}$1${normal}"