improves output decoration

This commit is contained in:
2019-05-13 14:07:01 +02:00
parent cdf26bc084
commit 7e74b65023

22
main.sh
View File

@@ -11,8 +11,9 @@ set -o pipefail
title () {
read title
echo " *************************************"
echo " ****"
echo "***** $title *****"
echo "***** $title"
echo "*****"
}
@@ -29,8 +30,8 @@ footer () {
section () {
read title
echo ":"
echo ":<*> $title..."
echo ":::::"
echo ":(*) $title..."
}
result () {
@@ -38,9 +39,9 @@ result () {
if [ $exit_code -eq 0 ]
then
echo ":<=> $success Ok $reset*****"
echo ":)=> $success Ok $reset ****"
else
echo ":<!> $error Error $reset*****"
echo ":(!> $error Error $reset ****"
fi
}
@@ -48,13 +49,20 @@ output () {
while read line
do
#[ -z "$line" ] && break
echo ": | $line"
echo "::::| $line"
done
}
output::warning () {
while read line
do
echo ":<!> $line"
echo ":::<!> $line"
done
}
output::info () {
while read line
do
echo ":::<?> $line"
done
}