improves output decoration

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

28
main.sh
View File

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